Need help with /n command
#5

Код:
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)
	        {
	            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;
			}
			new plevel = PlayerInfo[playerid][pLevel];
			new hlevel = PlayerInfo[playerid][pHelper];
			new alevel = PlayerInfo[playerid][pAdmin];
			new vlevel = PlayerInfo[playerid][pDonateRank];
			new stealthed = PlayerInfo[playerid][pStealthed];
			if(plevel >= 2 && vlevel == 0 && alevel == 0 && stealthed == 0) format(string, sizeof(string), "** Player %s: %s", sendername, result);
			if(plevel == 1 && vlevel == 0 && alevel == 0 && stealthed == 0) format(string, sizeof(string), "** Newbie %s: %s", sendername, result);
			if(hlevel == 1) format(string, sizeof(string), "** Helper %s: %s", sendername, result);
			if(hlevel >= 2) format(string, sizeof(string), "** Head Helper %s: %s", sendername, result);
			if(vlevel == 1) format(string, sizeof(string), "** Bronze VIP %s: %s", sendername, result);
			if(vlevel == 2) format(string, sizeof(string), "** Silver VIP %s: %s", sendername, result);
			if(vlevel == 3) format(string, sizeof(string), "** Gold VIP %s: %s", sendername, result);
			if(alevel >= 2 && stealthed == 0) format(string, sizeof(string), "** Admin %s: %s", sendername, result);
			OOCNewbie(NEWBIE_COLOR,string);
			if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pHelper] <= 0) { UseNewbieTimer[playerid] = true; SetTimerEx("UseNewbie",50*1000,0,"i",playerid); }
        }
    }
Try this instead.
Reply


Messages In This Thread
Need help with /n command - by DocK - 09.07.2013, 20:27
Re: Need help with /n command - by DocK - 10.07.2013, 11:14
Re: Need help with /n command - by Calabresi - 10.07.2013, 11:19
Re: Need help with /n command - by DocK - 10.07.2013, 17:05
Re: Need help with /n command - by KingyKings - 10.07.2013, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)