[ajuda] Gm SampForever Comando pra trocar de nick!
#1

Eu queria criar um comando pra troca de nick urgente! :S mais com o sampforever pq oq eu tenho ele da erro o que eu tenho й isso:

Код:
	if(strcmp(cmd,"/mudarnick",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
  		 new x_Nick[256];
  		 new mplayername[MAX_PLAYER_NAME];
  		 new carnick[MAX_PLAYERS];
	     x_Nick = strtok(cmdtext, idx);
	     if(!strlen(x_Nick))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USE: /mudarnick [nome]");
				return 1;
			}
			format(string, sizeof(string), "%s.ini", x_Nick);
			if(fexist(string))
			{
                SendClientMessage(playerid, COLOR_GREY,"Este nick ja estб sendo usado!");
				return 1;
			}
			if(mudandonick == 1)
			{
			SendClientMessage(playerid, COLOR_GREY,"Tente novamente mais tarde!");
			return 1;
			}
			mudandonick = 1;
			GetPlayerName(playerid,mplayername,sizeof(mplayername));
			format(string, sizeof(string), "%s.ini", mplayername);
			if(fexist(string))
			{
			GetPlayerName(playerid,mplayername,sizeof(mplayername));
			format(string, sizeof(string), "%s.ini", mplayername);
			fremove(string);
			}
   			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
	        	GetPlayerName(playerid,mplayername,sizeof(mplayername));
	        	if(strcmp(mplayername,BizzInfo[i][bOwner],true)==0)
	        	{

	        	    strmid(BizzInfo[i][bOwner], x_Nick, 0, strlen(x_Nick), 255);
	        	}
			}
			for(new i = 0; i < sizeof(SBizzInfo); i++)
			{
	        	GetPlayerName(playerid,mplayername,sizeof(mplayername));
	        	if(strcmp(mplayername,SBizzInfo[i][sbOwner],true)==0)
	        	{
	        	    strmid(SBizzInfo[i][sbOwner], x_Nick, 0, strlen(x_Nick), 255);
	        	}
			}
			for(new h = 0; h < sizeof(HouseInfo); h++)
			{
	        		GetPlayerName(playerid,mplayername,sizeof(mplayername));
	        		if(strcmp(mplayername,HouseInfo[h][hOwner],true)==0)
	        		{
	        		    strmid(HouseInfo[h][hOwner], x_Nick, 0, strlen(x_Nick), 255);
	        		}
			}
			for(new i = 0; i < sizeof(AdminInfo); i++)
	    	{
	        	GetPlayerName(playerid,mplayername,sizeof(mplayername));
	        	if(strcmp(mplayername,AdminInfo[i][AdminNick],true)==0)
				{
	            strmid(AdminInfo[i][AdminNick], x_Nick, 0, strlen(x_Nick), 999);
		        }
 			}
 			if(PlayerInfo[playerid][pVIP] > 2)
			{
 			for(new i = 0; i < sizeof(VipInfo); i++)
	    	{
	        	if(PlayerInfo[playerid][vipID] == VipInfo[i][vID])
				{
	            strmid(VipInfo[i][VipNick], x_Nick, 0, strlen(x_Nick), 999);
		        }
 			}
 			for(new c = 0; c < sizeof(CarInfo); c++)
	    	{
 				if(PlayerInfo[playerid][pCarKey] == CarInfo[c][cID])
				{
	            strmid(CarInfo[c][cOwner], x_Nick, 0, strlen(x_Nick), 999);
	        	}
	        }
	        }
			    GetPlayerName(playerid,playername,sizeof(playername));
			    new year, month,day;
				getdate(year, month, day);
				new hour, minute;
				gettime(hour,minute);
    			format(string, sizeof(string), "%s Mudou o Nick para %s ( %d/%d/%d - %d:%d)",playername,x_Nick, year, month, day,hour, minute);
    			ABroadCast(COLOR_YELLOW,string,1);
    			NickLog(string);
				format(string, sizeof(string), "%s",x_Nick );
    			SetPlayerName(playerid,string);
    			format(string, sizeof(string), "Vocк mudou seu nick para %s",x_Nick );
    			SendClientMessage(playerid, COLOR_GREY, string);
    			SendClientMessage(playerid, COLOR_GREY, "Tire uma SS para nгo esquecer o novo nick!");
    			SendClientMessage(playerid, COLOR_GREY, "Pressione F8");
    			SendClientMessage(playerid, COLOR_GREY, "Obrigado por usar o Poderoso Sistema de Nick");
    			OnPlayerUpdate(playerid);
    			OnPropUpdate();
			    SaveAdmin();
			    SaveCars();
			    SaveVip();
			    mudandonick = 0;
			    carnick[playerid] = 0;
    	return 1;
        }
sу que ele nгo tem os nomes do sampforever alguem me ajuda?,eu ja tentei editar mais ele da erro
Reply
#2

Qual erro da?
Reply
#3

da aquela lista de erros sabe quando vc tira 1 coisa e da uma lsita de erros intao,e tbm eu nгo sei editar pra ele ficar como o bpf eu peguei isso ai do thugh й uma coisa antiga serб q vc nгo teria um pra eu usa? eu sу quero um cmd pra ele troca o nick na hora,a pasta do nick й "Contas" do scriptfile
Reply
#4

Se for 26 erros geralmente sгo chaves. Se vocк pudesse postar os erros, ficaria melhor.
Reply
#5

ei ja achei la por favor me ajude no outro topico sorry o double post mais й urgenteeeee
Reply
#6

cara q eu me lembre ja contem esse cmd no gm so q vc tem q usar um cmd pra liberar o player a mudar o nick se nao me engano
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)