1. Look in any admin filterscript to see how the mute commands work.
2. http://forum.sa-mp.com/showthread.ph...mple+countdown 3. https://sampwiki.blast.hk/wiki/Creating_Commands 3 Answers. |
if(strcmp(cmdtext,"/count",true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 2) { new Float:X, Float:Y, Float:Z; new pName[30]; if (auts == false) { auts = true; GetPlayerName(playerid, pName, 30); format(string, 280, "*** %s started countdown.", pName); SendClientMessageToAll(COLOR_LIGHTBLUE, string); foreach (Player, i) { GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 5 ~g~-",1000,3); GetPlayerPos(i, X,Y,Z); } SetTimer("count4",1000,0); SetTimer("count3",2000,0); SetTimer("count2",3000,0); SetTimer("count1",4000,0); SetTimer("countgo",5000,0); SetTimer("stop",6000,0); } } else { SendClientMessage(playerid, 0xFF9900AA, "Count started!"); return 1; } }
1. Look in any admin filterscript to see how the mute commands work.
2. http://forum.sa-mp.com/showthread.ph...mple+countdown 3. https://sampwiki.blast.hk/wiki/Creating_Commands 3 Answers. |
new Lol[MAX_PLAYERS] = 0;//Creating a variable for it
if(strcmp(cmdtext,"/setlolto1",true) == 0)
{
Lol[playerid] = 1;//Setting it to 1 so he cannot execute the "/lol" command
SendClientMessage(playerid, COLOR, "Lol set to 1");//A message so that he/she knows it has been activated
}
if(strcmp(cmdtext,"/lol",true) == 0)
{
if(Lol[playerid] == 1) return Something //Means he cannot execute the command
SendClientMessage(playerid, COLOR, "Yay your 'lol' is 0 you receive this message"); //If is 'lol' is not 1 he will receive this without getting an error
}