17.03.2011, 00:10
Hello my /n chat for my server seems to be bugged
I set a helper such as /makehelper playerid <1-2> and it tells them
You must wait 50 seconds before speaking in that channel ! for helpers should use /n chat without waiting the seconds should be for newbies only.
code:
I set a helper such as /makehelper playerid <1-2> and it tells them
You must wait 50 seconds before speaking in that channel ! for helpers should use /n chat without waiting the seconds should be for newbies only.
code:
Код:
if(strcmp(cmd, "/newbie", true) == 0 || strcmp(cmd, "/n", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); return 1; } if(PlayerInfo[playerid][pTut] == 0) { Kick(playerid); return 1; } if((nonewbie) && PlayerInfo[playerid][pAdmin] < 3) { SendClientMessage(playerid, COLOR_GREY, " The Newbie channel has been disabled by an Admin !"); return 1; } if(PlayerInfo[playerid][pNewbieMuted] == 1) { SendClientMessage(playerid, COLOR_GREY, " You are banned from speaking in that channel !"); return 1; } if(UseNewbieTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY," You must wait 50 seconds before speaking in that channel !"); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[96]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/n)ewbie [newbie chat]"); return 1; } if(PlayerInfo[playerid][pLevel] > 1 && PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pHelper] <= 0) format(string, sizeof(string), "** Player %s: %s", sendername, result); else if(PlayerInfo[playerid][pAdmin] >= 2) format(string, sizeof(string), "** Admin %s: %s", sendername, result); else if(PlayerInfo[playerid][pHelper] >= 2) format(string, sizeof(string), "** Head Helper %s: %s", sendername, result); else if(PlayerInfo[playerid][pDonateRank] >= 1) format(string, sizeof(string), "** VIP ** %s: %s", sendername, result); else if(PlayerInfo[playerid][pHelper] == 1) format(string, sizeof(string), "** Helper %s: %s", sendername, result); else format(string, sizeof(string), "** Newbie %s: %s", sendername, result); OOCNewbie(NEWBIE_COLOR,string); if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pHelper] <= 1) { UseNewbieTimer[playerid] = true; SetTimerEx("UseNewbie",50*1000,0,"i",playerid); } } }