Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:ann(playerid, params[])
- {
- if(Administrator[playerid] < 1)
- return 0;
- new msg[512], time;
- if(sscanf(params, ds[384], time, msg))
- return SCM(playerid, -1, /ann [sekundy] [tresc]);
- new count = 0;
- for(new i; i < strlen(msg); i++)
- {
- if(msg[i] == '~') count++;
- }
- if(IsNumberEven(count) == 0 && count != 0)
- {
- SCM(playerid, -1, Wpisano nieprawidłową ilość tyld (~));
- return 1;
- }
- new jName[26];
- GetPlayerName(playerid, jName, sizeof(jName);
- format(msg, sizeof(msg), "%s - %s", jName, msg);
- TextDrawSetString(AnnTD, msg);
- if(AnnON == 1)
- KillTimer(AnnTim);
- AnnTim = SetTimer(WylanczAnn, time * 1000, 0);
- TextDrawShowForAll(AnnTD);
- AnnON = 1;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement