Need help with /n command
#1

Hi sa-mp.com . I have some problem with this script .. When i compile this i have no error but when i'am in-game and i type /n test he does nothing .. Sorry for bad english , i'am from Romania .

Код:
	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 ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   The OOC channel has been disabled by an Admin !");
				return 1;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "   You can't speak, you have been silenced !");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
	for(new i=0; i<MAX_PLAYERS; i++)
	if(FindIP(result)) ///
	{
	   new advertiser[MAX_PLAYER_NAME];
	   GetPlayerName(playerid, advertiser, sizeof(advertiser));
	   format(string, sizeof(string), "[Warning]: %s[ID: %d] face reclama ",advertiser,i);
	   ABroadCast(COLOR_LIGHTRED,string,1);
	   return 0;
	}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{55D4FF}SCRIE:{B4B4B4} (/n)ewbie [text]");
				return 1;
			}

				if(PlayerInfo[playerid][pLevel] == 1)
			format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 1 - %s[%d]:{FFFFFF} %s",sendername, result);
	            if(PlayerInfo[playerid][pLevel] == 2)
	            format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 2 - %s[%d]:{FFFFFF} %s",sendername, result);
	            if(PlayerInfo[playerid][pLevel] == 3)
	            format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 3 - %s[%d]:{FFFFFF} %s",sendername, result);
	            if(PlayerInfo[playerid][pAdmin] == 1)
	            format(string, sizeof(string), "{7F90E5}*(N) Administrator Nivel 1 - %s[%d]:{FFFFFF} %s",sendername, result);
	            if(PlayerInfo[playerid][pAdmin] == 2)
	            format(string, sizeof(string), "{7F90E5}*(N) Administrator Nivel 2 - %s[%d]:{FFFFFF} %s",sendername, result);
		}
		return 1;
	}
	if(strcmp(cmd, "/non", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 7 && (!noooc))
			{
				noooc = 1;
				BroadCast(COLOR_GRAD2, "   Newbie chat channel disabled by an Admin !");
			}
			else if (PlayerInfo[playerid][pAdmin] >= 2 && (noooc))
			{
				noooc = 0;
				BroadCast(COLOR_GRAD2, "   Newbie chat channel enabled by an Admin !");
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
			}
		}
		return 1;
	}
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)