SA-MP Forums Archive
[Ajuda] deletar veiculo - 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] deletar veiculo (/showthread.php?tid=591897)



deletar veiculo - CZ - 18.10.2015

Galera to usando o vspawner e eu tentei faze pro player da /v
e o veнculo anterior dele deletar mais nгo to conseguindo fazer alguйm pode me ajudar?


Re: deletar veiculo - De4gle - 18.10.2015

posta o cуdigo


Re: deletar veiculo - CZ - 18.10.2015

PHP Code:
SpawnVehicle_InfrontOfPlayer(playeridvehiclemodelcolor1color2)
{
    new 
Float:x,Float:y,Float:z;
    new 
Float:facing;
    new 
Float:distance;

    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridfacing);

    new 
Float:size_x,Float:size_y,Float:size_z;
    
GetVehicleModelInfo(vehiclemodelVEHICLE_MODEL_INFO_SIZEsize_xsize_ysize_z);
    
    
distance size_x 0.5;

      
+= (distance floatsin(-facingdegrees));
    
+= (distance floatcos(-facingdegrees));

    
facing += 90.0;
    if(
facing 360.0facing -= 360.0;
    return 
CreateVehicle(vehiclemodelxy+ (size_z 0.25), facingcolor1color2, -1);