SA-MP Forums Archive
[Ajuda] Veiculo trancado - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Veiculo trancado (/showthread.php?tid=653488)



Veiculo trancado - SamuelMatheus05 - 06.05.2018

Bom galera to fazendo sistema de concecionaria e qualquer um estб podendo entrar no carro se alguem puder me ajudar agradeзo desde jб!

PHP Code:
for(new 0MAX_CARROSc++)
    {
        
CarroInfo[c][IDCarro] = vehicleid;
        if(
PlayerInfo[playerid][DonoCarroID] != CarroInfo[CarroInfo[vehicleid][IDCarro]][IDCarro] && CarroInfo[CarroInfo[vehicleid][IDCarro]][TravaCarro] == 1)
        {
            new 
Float:XFloat:YFloat:Z;
            
GetPlayerPos(playeridXYZ);
            
SetPlayerPos(playeridXYZ);
            new 
stirng[5000];
            
format(stirngsizeof(stirng),"Esse veнculo pertence б %s",DOF2_GetString(CarroArquivo(GetPlayerVehicleID(playerid)),"DonoCarro"));
            
SendClientMessage(playeridvermelhostirng);
            return 
1;
        }
        return 
1;
    } 



Re: Veiculo trancado - NelsonC - 06.05.2018

Tente

PHP Code:
for(new 0MAX_CARROSc++) {
        
CarroInfo[c][IDCarro] = vehicleid;
        if(
PlayerInfo[playerid][DonoCarroID] != CarroInfo[CarroInfo[vehicleid][IDCarro]][IDCarro] && CarroInfo[CarroInfo[vehicleid][IDCarro]][TravaCarro] == 1) {
            new 
str33[128];
            
format(str33sizeof(str33), "Esse veнculo pertence б %s"DOF2_GetString(CarroArquivo(GetPlayerVehicleID(playerid)), "DonoCarro"));
            
SendClientMessage(playeridvermelhostr33);
            
RemovePlayerFromVehicle(playerid); // Remove o(a) jogador(a) do veнculo.
            
return true;
        }
        return 
true;
    }