[Help]Heal command
#2

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:
Код:
new gPlayerClass[MAX_PLAYERS];
Under your OnPlayerRequestClass(playerid,classid)

Код:
if(classid == 0)
{
    gPlayerClass[playerid] = 0;
}
if(classid == 2)
{
    gPlayerClass[playerid] = 2);
}
Then under your heal command:

Код:
if(!strcmp(cmdtext,"/heal",true))
{
    if(gPlayerClass[playerid] != 0 || gPlayerClass[playerid] != 2)) return 0;

    //Rest of your healing script
    return 1;
}
Reply


Messages In This Thread
[Help]Heal command - by Giotis11 - 06.07.2010, 21:36
Re: [Help]Heal command - by DJDhan - 06.07.2010, 21:51
Re: [Help]Heal command - by TheKingOfSamp - 06.07.2010, 23:08
Re: [Help]Heal command - by Giotis11 - 07.07.2010, 00:24
Re: [Help]Heal command - by oliverrud - 07.07.2010, 00:27

Forum Jump:


Users browsing this thread: 1 Guest(s)