27.03.2018, 06:16
Код:
CMD:ann(playerid, params[]) { if(Player[playerid][Level] < 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"{0099FF}>> {EEEEEE}Error: {0099FF}You Need High level."); new textt[56]; if(sscanf(params, "s[128]", textt)) return SendClientMessage(playerid, -1, "/ann text"); if(!IsSafeGametext(textt)) return SendClientMessage(playerid, -1, "You're probably missing a '~' which can crash you and/or other clients!"); GameTextForAll(textt, 4000, 3); new pNamex[32], msgg[128]; GetPlayerName(playerid, pNamex, sizeof(pNamex)); format(msgg, sizeof(msgg), "Admi {FFFFFF}%s envio ann", pNamex); SendClientMessageToAll(-1, msgg); return 1; } stock IsEven(integer) { if(integer % 2 == 0) return 1; return 0; } stock IsSafeGametext(text[]) { new cnt = 0; for(new i = 0; i < strlen(text); i ++) { if(text[i] == '~') cnt ++; } if(IsEven(cnt) == 0) return 0; return 1; }