[Ajuda] Leitura do chat gang
#1

Tenho um fs de gang do sub-zer00 й queria que s admins podessem ler o que falam na gang com isso
if(CallRemoteFunction("GetPlayerAdminLevel","i",i) >= 5) jб tentei de tudo sempre da erro me ajudem

Код:
public OnPlayerText(playerid, text[])
{
	if(text[0]=='!'&&GangID[playerid]!=0)
	{
	    new fm[128],fm2[128],resto[128];
	    if(GangLevel[playerid]>3&&text[1]=='!')
	    {
	        new nml[MAX_PLAYER_NAME];
	        GetPlayerName(playerid,nml,sizeof(nml));
	        strmid(resto,text,2,strlen(text),128);
	        if(GangLevel[playerid]==5)
		    {
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
				PlayerPlaySound(i,1056,0.0,0.0,0.0);
		    	format(fm,128,"~b~%s: %s",POS_NV5,resto);
		    	format(fm2,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",nml,resto);
		    }
		    else
		    {
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
				PlayerPlaySound(i,1056,0.0,0.0,0.0);
		        format(fm,128,"~b~%s: %s",POS_NV4,resto);
		    	format(fm2,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",nml,resto);
		    }
	        for(new i=0;i<MAX_PLAYERS;i++)
                if(IsPlayerConnected(i))
		        	if(GangID[playerid]==GangID[i])
		        	{
		            	GameTextForPlayer(i,fm,5000,3);
		            	SendClientMessage(i,azul,fm2);
					}
	        return 0;
	    }
	    strmid(resto,text,1,strlen(text),128);
	    new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name));
 		switch(GangLevel[playerid])
 		{
 		    case 0:
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
 		        format(fm,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",name,resto) && PlayerPlaySound(i,1056,0.0,0.0,0.0);
 		    case 1:
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
 		        format(fm,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",name,resto) && PlayerPlaySound(i,1056,0.0,0.0,0.0);
            case 2:
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
 		        format(fm,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",name,resto) && PlayerPlaySound(i,1056,0.0,0.0,0.0);
            case 3:
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
 		        format(fm,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",name,resto) && PlayerPlaySound(i,1056,0.0,0.0,0.0);
            case 4:
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
 		        format(fm,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",name,resto) && PlayerPlaySound(i,1056,0.0,0.0,0.0);
            case 5:
				for(new i=0;i<MAX_PLAYERS;i++)
				if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
 		        format(fm,128,"{41FF00}[GANG CHAT] {FF7700}%s: %s",name,resto) && PlayerPlaySound(i,1056,0.0,0.0,0.0);
 		}
	    for(new i=0;i<MAX_PLAYERS;i++)
	        if(IsPlayerConnected(i))
		        if(GangID[playerid]==GangID[i])
		            SendClientMessage(i,azul,fm);
		return 0;
	}
	return 1;
}
Reply


Messages In This Thread
Leitura do chat gang - by zqkRazer - 24.09.2014, 20:20
Re: Leitura do chat gang - by DavidCosta - 25.09.2014, 00:41
Re: Leitura do chat gang - by zqkRazer - 25.09.2014, 20:29
Re: Leitura do chat gang - by zqkRazer - 25.09.2014, 20:43
Re: Leitura do chat gang - by DavidCosta - 26.09.2014, 01:29

Forum Jump:


Users browsing this thread: 1 Guest(s)