/destroycar - 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: /destroycar (
/showthread.php?tid=166443)
/destroycar -
dannydarth - 08.08.2010
i know there is a /destroycar...but you have to be in the car for it to be gone...is there a command where say your specing a player it will destroy the car there in while you spec them?
Re: /destroycar -
Claude - 08.08.2010
Add below /spectate
pawn Код:
if(IsPlayerInAnyVehicle(targetid))
{
new tvid = GetPlayerVehicleID(targetid);
DestroyVehicle(tvid);
}
Re: /destroycar -
dannydarth - 08.08.2010
hhmm wouldnt you have to integrate that with /destroycar to get it to work?
Re: /destroycar -
Calgon - 08.08.2010
Quote:
Originally Posted by dannydarth
hhmm wouldnt you have to integrate that with /destroycar to get it to work?
|
Claude's code (integrated into your spectating command) would destroy the vehicle, with the specific targetid variable (which you might need to change).
I've changed the code (seeing as Claude was time and created a variable for it):
pawn Код:
if(IsPlayerInAnyVehicle(targetid))
{
DestroyVehicle(GetPlayerVehicleID(targetid));
}
Re: /destroycar -
dannydarth - 08.08.2010
so when i spec the person it will destroy his car automatically