how to Destroy vehicle - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to Destroy vehicle (
/showthread.php?tid=73460)
how to Destroy vehicle -
mannu - 15.04.2009
Well please Tell Me that how to destroy immediately
a recently created vehicle when player exits from it pls help me
more inFo

layer Spawns a vehicle By Vehicle Menu
Re: how to Destroy vehicle -
SpiderPork - 15.04.2009
DestroyVehicle
https://sampwiki.blast.hk/wiki/DestroyVehicle
Re: how to Destroy vehicle -
Danut - 15.04.2009
create a variable and use a timer
Re: how to Destroy vehicle -
mannu - 15.04.2009
please gimme a example dudes
Re: how to Destroy vehicle -
Clum` - 15.04.2009
Quote:
Originally Posted by MoroJr™
create a variable and use a timer
|
Explain how a timer would be helpful when he specifically said.
Quote:
Originally Posted by mannu
Well please Tell Me that how to destroy immediately
a recently created vehicle when player exits from it pls help me
|
Re: how to Destroy vehicle -
hanzen - 15.04.2009
OnPlayerExitVehicle delete the car?
Re: how to Destroy vehicle -
mannu - 15.04.2009
Well thanks for your info i had overcomed this but a new bug
but tell me how to create a timer i need it and how to implement it also
here's what is used
Код:
public OnPlayerStateChange(playerid,newstate)
{
if( GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFF0000AA,"you entered a vehicle");
vd=GetPlayerVehicleID(playerid);
}
else
{
SendClientMessage(playerid,0xFF0000AA,"you exited a vehicle:it will be destroyed now");
DestroyVehicle(vd);
return 1;
}
return 0;
}
so as soon as he exits the vehicle it gets deleted
but when i joins the server
it automatically gives message
you exited a vehicle:it will be destroyed now
you exited a vehicle:it will be destroyed now
twice other things work 100% fine
Re: how to Destroy vehicle -
Clum` - 15.04.2009
Код:
public OnPlayerStateChange(playerid,newstate)
{
if( GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFF0000AA,"you entered a vehicle");
vd=GetPlayerVehicleID(playerid);
}
else if (GetPlayerState(playerid)==4)
{
SendClientMessage(playerid,0xFF0000AA,"you exited a vehicle:it will be destroyed now");
DestroyVehicle(vd);
return 1;
}
return 0;
}
Re: how to Destroy vehicle -
mannu - 15.04.2009
thxs dude
Re: how to Destroy vehicle -
mannu - 15.04.2009
But it doesn't Destroys car