Quote:
Originally Posted by Gazmull
Hi 
Oh! If you want it for admins only:
pawn Code:
dcmd_Ann(playerid, params[]) { new AnnString[64]; //new string for announce texts if(sscanf(params, "s", AnnString)) return SendClientMessage(playerid, WRONG_COLOR, "Usage: /Ann [TEXT]"); //if you didn't put anything, just the /ann only else { TextDrawSetString(Ann, AnnString); //draws the text you typed TextDrawShowForAll(Ann); //to avoid errors SetTimer("HideAnn", 5000, false); //sets the timer for hiding the text in 5seconds } if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid, -1, "You ain't admin to use this command!"); //returns that he don't have right to use this command until he login as rcon admin return 1; }
|
If you are not an admin and you type this command, it will still announce, right? This if(IsPlayerAdmin(playerid) == 0) should be inside else clause, I think.