06.07.2010, 21:51
Use a variable to store the class id of the player because under the OnPlayerCommandText callback, you won't be able to get it.
At the top of your script:
Under your OnPlayerRequestClass(playerid,classid)
Then under your heal command:
At the top of your script:
Код:
new gPlayerClass[MAX_PLAYERS];
Код:
if(classid == 0) { gPlayerClass[playerid] = 0; } if(classid == 2) { gPlayerClass[playerid] = 2); }
Код:
if(!strcmp(cmdtext,"/heal",true)) { if(gPlayerClass[playerid] != 0 || gPlayerClass[playerid] != 2)) return 0; //Rest of your healing script return 1; }