SA-MP Forums Archive
[AJUDA]OnPlayerEnterVehicle - 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]OnPlayerEnterVehicle (/showthread.php?tid=342367)



[AJUDA]OnPlayerEnterVehicle - lucas_mdr1235 - 13.05.2012

Restringir o roubo de veiculo em movimento acima de 10 km/h nao ter como robar como fazer ?



Desde ja agradeзo a ajuda de todos e compreensгo ! ! !


Re: [AJUDA]OnPlayerEnterVehicle - ViniBorn - 13.05.2012

Dб pra fazer usando GetVehicleVelocity ou GetPlayerPos + Teorema de pitбgoras


Re: [AJUDA]OnPlayerEnterVehicle - lucas_mdr1235 - 13.05.2012

eu tentei fazer um mais зa porra nao funciona
olha
PHP код:
    new string[128];
    new 
Float:Velocity[3];
    
GetVehicleVelocity(vehicleidVelocity[0], Velocity[1], Velocity[2]);
    if(!
ispassenger && Velocity[0] > || !ispassenger && Velocity[1] > 10)
    {
        
SendClientMessage(playeridCOLOR_WARNING"*** Voce nao pode robar veiculos em movimento");
        
format(stringsizeof(string), "*** Ele nao pode robar veiculos em movimento");
        
DetectorProx(20.0,playerid,string,COLOR_ROXO);
        
TogglePlayerControllable(playerid,0);
    }
    else
    {
        
format(stringsizeof(string), "** %s Entra no veiculo."pNome(playerid));
        
DetectorProx(20.0,playerid,string,COLOR_ROXO);
    } 



Re: [AJUDA]OnPlayerEnterVehicle - ViniBorn - 13.05.2012

pawn Код:
new string[128];
new Float:Velocity[3];
GetVehicleVelocity(vehicleid, Velocity[0], Velocity[1], Velocity[2]);
if(!ispassenger)
{
    if(Velocity[0] > 0.1 || Velocity[1] > 0.1)
    {
        SendClientMessage(playerid, COLOR_WARNING, "*** Voce nao pode robar veiculos em movimento");
        DetectorProx(20.0,playerid,"*** Ele nao pode robar veiculos em movimento",COLOR_ROXO);
        TogglePlayerControllable(playerid,0);
    }
}
else
{
    format(string, sizeof(string), "** %s Entra no veiculo.", pNome(playerid));
    DetectorProx(20.0,playerid,string,COLOR_ROXO);
}



Re: [AJUDA]OnPlayerEnterVehicle - lucas_mdr1235 - 13.05.2012

o problema e quando vc pula do carro e tentar entrar nao da pra entrar aparece a mensagem Voce nao pode robar veiculos em movimento


Re: [AJUDA]OnPlayerEnterVehicle - ViniBorn - 13.05.2012

Isso pode ajudar

OnUnoccupiedVehicleUpdate


Re: [AJUDA]OnPlayerEnterVehicle - lucas_mdr1235 - 13.05.2012

mano nao conseguim ter progresso positivo tem como vc me ajudar melhor