[Ajuda] OnPlayerStateChange
#10

Sу um exemplo
Код:
...
printf("vehid: %d", vehicleid"); //mostrando o vehicleid
if(newstate == PLAYER_STATE_DRIVER)
    	{

    			for(new V = 0; V < TOTALSETS; V ++)
    			{
    			    if(vehicleid == VeiculoSET[V])
    			    {

                        tmp = dini_Get(VeiculosFile(V), "Dono");
                        printf("VeiculoSET[%d]: %d | dono: %s", V, VeiculoSET[V], tmp); //mostrar os dados do veiculo

            			new APr = dini_Int(VeiculosFile(V), "Apreendido");
    	 		    	new engine, lights, alarm, doors, bonnet, boot, objective;
    				    GetVehicleParamsEx(VeiculoSET[V], engine, lights, alarm, doors, bonnet, boot, objective);
    				    SetVehicleParamsEx(VeiculoSET[V], engine, lights, alarm, doors, bonnet, boot, 0);
    		        	if(APr != -1)
    		        	{
    	    		    	format(string, sizeof(string), "[ERRO] Esse SET '%s' estб apreendido e nгo pode ser usado!", dini_Get(VeiculosFile(V), "NomeVeiculo"));
    			        	SendClientMessage(playerid, CORX1, string);
    			        	RemovePlayerFromVehicleEx(playerid);
    			        	SetVehicleToRespawn(VeiculoSET[V]);
    			        	return 1;
    		        	}
    			        if(strcmp(tmpx, tmp, true) == 0)
    					{
    					    format(string, sizeof(string), "[INFO] Bem vindo(a) ao seu veнculo prуprio '%s', %s", dini_Get(VeiculosFile(V), "NomeVeiculo"));
    			        	SendClientMessage(playerid, COR_ORKUT, string);
        	}
...
Percebi que vocк compara as strings de dono do veнculo com uma string "tmpx", mas vocк nгo atribuiu nenhuma valor a ela...
Reply


Messages In This Thread
OnPlayerStateChange - by FreeGells - 18.04.2017, 01:13
Re: OnPlayerStateChange - by FreeGells - 18.04.2017, 02:52
Re: OnPlayerStateChange - by ViniBorn - 18.04.2017, 03:14
Re: OnPlayerStateChange - by FreeGells - 18.04.2017, 03:38
Re: OnPlayerStateChange - by Scorpion659 - 18.04.2017, 03:39
Re: OnPlayerStateChange - by FreeGells - 18.04.2017, 03:41
Re: OnPlayerStateChange - by renatog - 18.04.2017, 03:57
Re: OnPlayerStateChange - by FreeGells - 18.04.2017, 03:58
Re: OnPlayerStateChange - by FreeGells - 18.04.2017, 04:00
Re: OnPlayerStateChange - by renatog - 18.04.2017, 04:06

Forum Jump:


Users browsing this thread: 5 Guest(s)