18.07.2015, 20:40
(
Последний раз редактировалось Crystallize; 23.12.2015 в 13:15.
)
Fixed.
Create a variable and when you use the command make it set it to 1 then in the /ooc make an if statement that checks if it is set to 1 if it is then simply send a message and return a value.
P.S. try making your own code instead of requesting people to create ones for you. |
Thanks for the advice mate , but as I said I tried but couldn't ....
|
Then you can request someone to make one for you in here: https://sampforum.blast.hk/showthread.php?tid=447813
This is a scripting help section not a request section, most of your posts here consists of requests of scripts and you never learn anything from the code we give you, you just copy paste it if you really want to have scripts either learn them or download filterscripts and watch tutorials. You can always use the samp wiki too. |
new Bool:OOC; // <-- or some shit liek that CMD:ooc(playerid, params[]) { if(OOC == true) { new sendername[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Correct usage: /ooc [text]"); if(gettime() - 3 < pInfo[playerid][pSpamDrop]) return SendClientMessage(playerid,-1,"*"COL_RED" Wait 3 Seconds to type again!"); format(string, sizeof(string), ""COL_GREY"" "[GLOBAL CHAT] %s: %s ", sendername, params); SendClientMessageToAll(0xFF3300, string); return 1; } else return SendClientMessage(playerid, -1, "OOC disabled"); } CMD:toggleooc(playerid, params[]) { if(Player[playerid][pAdminLevel] >= 1) { OOC = !OOC; } return 1; }
I Dont script in pawno anymore but you can do something like this
[code] new Bool:OOC; // <-- or some shit liek that CMDoc(playerid, params[]) { if(OOC == true) { new sendername[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Correct usage: /ooc [text]"); if(gettime() - 3 < pInfo[playerid][pSpamDrop]) return SendClientMessage(playerid,-1,"*"COL_RED" Wait 3 Seconds to type again!"); format(string, sizeof(string), ""COL_GREY"" "[GLOBAL CHAT] %s: %s ", sendername, params); SendClientMessageToAll(0xFF3300, string); return 1; } } |