Two commands
#1

I need /ad command with timer to avoid spam, please..
i really don't know how to use timer..

and if possible a (/stat [playername]) for admins to see offline players's stats
i'm using INI and i have a login/register system, just give me an example and i'll edit the reset.
Reply
#2

To start a timer for a specific user use SetTimerEx

For Example:
Quote:

//At the top of your script below includes
forward adtimer(playerid);
new avoidspam[MAX_PLAYERS];

//Inside Command (I used ZCMD)
CMD:ad(playerid, params[])
{
new adformat[32];
SetTimerEx("adtimer", 30000, false, "i", playerid);
avoidspam[playerid] = true;
format(adformat, sizeof(adformat), "Advertisment : %s", input[]);
SendClientMessageToAll(-1, adformat);
}

//The public
public adtimer(playerid)
{
avoidspam[playerid] = false;
return 1;
}

I havent tested it, but you get the point. Its pretty simple
Reply
#3

ow thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)