How to: Detection?
#3

Quote:
Originally Posted by Lynn
View Post
pawn Code:
new UsedCmd[MAX_PLAYERS] = 0;
pawn Code:
public OnPlayerConnect(playerid)
{
    UsedCmd[playerid] = 0;
    return 1;
}
pawn Code:
CMD:cmd(playerid, params[])
{
    // Do stuff here
    UsedCmd[playerid]++; // This will increase it +1
}
Then from there, it'd be
pawn Code:
if(UsedCmd[playerid] >= 5) { // Change 5 to the number of your choice.
How would I be able to setup the rest of the system functioning only if you used the specific command within a specific time? Perhaps 1 minute.
Reply


Messages In This Thread
How to: Detection? - by lexurs - 20.05.2014, 21:58
Re: How to: Detection? - by Lynn - 20.05.2014, 23:10
Re: How to: Detection? - by lexurs - 20.05.2014, 23:23
Re: How to: Detection? - by K9IsGodly - 20.05.2014, 23:36
Re: How to: Detection? - by lexurs - 20.05.2014, 23:38
Re: How to: Detection? - by Lynn - 20.05.2014, 23:52
Re: How to: Detection? - by arakuta - 20.05.2014, 23:57
Re: How to: Detection? - by lexurs - 21.05.2014, 00:05
Re: How to: Detection? - by Lynn - 21.05.2014, 00:20

Forum Jump:


Users browsing this thread: 4 Guest(s)