buffymaniack wrote on Tue, 13 June 2006 12:37 |
cheers mate, worked perfectly! any ideas about the PM on poke thingy? Cheers buffymaniack
|
I had 4 minutes before I had to go to work, so don't blame me if this is crap... but i think it should be fine for what you want...
//script
void reb_msg_poke::Poked(GameObject *obj,GameObject *poker)
{
int x;
x = Get_Int_Parameter("Player_Type");
if (CheckPlayerType(poker,x))
{
return;
}
if (!Commands->Is_A_Star(poker))
{
return;
}
char message[1000];
sprintf(message,"msg %d %s",Get_Player_ID(poker),Get_Parameter("Message"));
Console_Input(message);
}
//registrant
ScriptRegistrant<reb_msg_poke> reb_msg_poke_Registrant("reb_msg_poke","Player_Type:int,Message:string");
//for the .h file
class reb_msg_poke : public ScriptImpClass {
void Poked(GameObject *obj,GameObject *poker);
};