# command without "/"
#2

pawn Код:
//global
new enableCmd[MAX_PLAYERS]; //the toggle variable for us to use
pawn Код:
//OnPlayerEnterCheckpoint
enableCmd[playerid] = 1; //make it possible for player to use the command if he enters the checkpoint
pawn Код:
//OnPlayerExitCheckpoint
enableCmd[playerid] = 0; //make it impossible for player to use the command if he leaves the checkpoint
pawn Код:
//OnPlayerText
if(enableCmd[playerid] && IsPlayerInCheckpoint(playerid))
{
    if(!strcmp(text, "1", true))
    {
        //stuff if player types 1
    }
    //continue making for the other numbers
}
I hope it helped!
Reply


Messages In This Thread
# command without "/" - by StrickenKid - 30.03.2009, 22:51
Re: # command without "/" - by LarzI - 30.03.2009, 22:58
Re: # command without "/" - by StrickenKid - 30.03.2009, 23:09
Re: # command without "/" - by LarzI - 30.03.2009, 23:16
Re: # command without "/" - by StrickenKid - 30.03.2009, 23:19
Re: # command without "/" - by LarzI - 30.03.2009, 23:23
Re: # command without "/" - by StrickenKid - 30.03.2009, 23:28
Re: # command without "/" - by LarzI - 30.03.2009, 23:29
Re: # command without "/" - by StrickenKid - 30.03.2009, 23:30

Forum Jump:


Users browsing this thread: 1 Guest(s)