One time command.
#5

@Blackraven: Not quite. The variable would reset each time you did the command, because you declare the variable inside it. You would have to declare it globally for it to work, like I've done below.
_________

You would need to declare a global boolean, for example:

pawn Код:
new
    bool: g_bCmdUsed[ MAX_PLAYERS ]
;
Then you would need to set it to do a check in the command if g_bCmdUsed is true, and if it's not, go through with the command and set it to true:

pawn Код:
if( !g_bCmdUsed[ playerid ] ) //if it's false
{
    //do command
    g_bCmdUsed[ playerid ] = true;
}
Reply


Messages In This Thread
One time command. - by dorperez - 01.02.2013, 16:05
Re: One time command. - by BlackRaven - 01.02.2013, 16:08
Re: One time command. - by dorperez - 01.02.2013, 16:09
Re: One time command. - by BlackRaven - 01.02.2013, 16:17
Re: One time command. - by LarzI - 01.02.2013, 16:29
Respuesta: Re: One time command. - by OPremium - 01.02.2013, 16:30
Re: One time command. - by dorperez - 01.02.2013, 16:32

Forum Jump:


Users browsing this thread: 1 Guest(s)