25.06.2011, 18:06
Quote:
Okay, ill try that.
EDIT: Cant i just use OnPlayerRequestClass(playerid, classid); ? |
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SendClientMessage(playerid,0xFFFFFFAA,"OnPlayerRequestClass was called :D !");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/test", cmdtext, true, 5))
{
CallLocalFunction("OnPlayerRequestClass","d",playerid);//Calls the OnPlayerRequestClass, but only the SendClientMessage code that is inside its will work. The selection of chars, teams and etc will won't appear :p.
return 1;
}
return 0;
}
Well, i did a function to you, it should solve your problem :
pawn Код:
#define RequestClassForPlayer(%0); ForceClassSelection(%0),SetPlayerHealth(%0,0),SpawnPlayer(%0);
I hope that i have helped .