Okay since everyone is posting non-working solutions, apart from one guy who got fairly close. The best solution to limiting a command to be useable every 50 seconds is to simply use GetTickCount() and not timers, here is an example of using it in your command.
pawn Код:
new iLastStamp[MAX_PLAYERS];
CMD:newb(playerid, params[])
{
if((GetTickCount() - iLastStamp[playerid]) < 50000) return SendClientMessage(playerid, red, "You can only use this command every 50 seconds!");
new id;
if(sscanf(params, "us[129]", id,params)) return SendClientMessage(playerid, red, "USAGE: (/newb)ie [text]");
new name[24], string[128];
GetPlayerName(playerid, name, 24);
format(string, sizeof string, "** Newbie %s: %s",name,params);
SendClientMessageToAll(-1, string);
iLastStamp[playerid] = GetTickCount();
return 1;
}
So let me explain what's happening here, you're getting the current tick count from when the server started in miliseconds and then subtracting the last time someone executed the command, then checking if it's less than 50000. If it's less than 50,000, then 50000 miliseconds (50 seconds) have not passed and the player cannot use the command yet.
The upside is that you're not using timers and making loads of public functions just to reset a variable. Another upside is that you could easily tell the player exactly how long more they have to wait!
Isn't that much better and easier than using timers?
Note: The reason your command was not working is because your if statement is finishing with the return, if statements can only have one function executed after it, if you have a bracket after it, then it will run everything inside of the bracket, but you had a function after it, so those brackets meant nothing and the else statement wasn't actually part of that if statement.