SA-MP Forums Archive
Help Vehicles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Vehicles (/showthread.php?tid=299939)



Help Vehicles - eblood1 - 28.11.2011

when a player have a vehicle and they disconnect i want the car to get destroy how can i do that?
pls help....


Re: Help Vehicles - Azzeto - 28.11.2011

You can try this

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
veh GetPlayerVehicleID(playerid);
    
DestroyVehicle(playerid,veh);
    return 
1;

Not tested, just wrote it down real fast, but try it and if it doesn't work i'll edit it..


Re: Help Vehicles - eblood1 - 28.11.2011

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
You can try this

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
veh GetPlayerVehicleID(playerid);
    
DestroyVehicle(playerid,veh);
    return 
1;

Not tested, just wrote it down real fast, but try it and if it doesn't work i'll edit it..
thanxz man