Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- CMD:n(playerid,params[])
- {
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You are muted from the newbie chat channel.");
- return 1;
- }
- if(NewbieTimer[playerid] > 0)
- {
- new string[128],cmdtext;
- format(string, sizeof(string), "You must wait %d between each message.", NewbieTimer[playerid]);
- SendClientMessage(playerid, COLOR_GREY, string);
- return 1;
- }
- new length = strlen(cmdtext);
- new offset = idx;
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_NEWBIE, "{33CCFF}USAGE:{FFFFFF} /newb [text]");
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] < 1)
- {
- NewbieTimer[playerid] = 30;
- }
- if(PlayerInfo[playerid][pAdmin]<1)
- {
- format(string, sizeof(string), "** Newbie %s: %s", GetPlayerNameEx(playerid), result);
- }
- if(PlayerInfo[playerid][pAdmin] == 1)
- {
- format(string, sizeof(string), "** Moderator %s: %s", GetPlayerNameEx(playerid), result);
- }
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- format(string, sizeof(string), "** Admin %s: %s", GetPlayerNameEx(playerid), result);
- }
- foreach(Player, n)
- {
- SetTimer("NewbTimer", 25000, 0);
- SendClientMessage(n, COLOR_NEWBIE, string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment