SA-MP Forums Archive
how to delete player 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: how to delete player vehicles? (/showthread.php?tid=655201)



how to delete player vehicles? - wilking - 15.06.2018

please help me .

how to delete player vehicle or set vehicle of player is emty in register finish?

my gamemode have error , player register then receive one or two or three cars random model .

and now , i will code script for delete car then player reg finish .

help me ... pls .

and which function is use for this . Tks so much .


Re: how to delete player vehicles? - GTLS - 15.06.2018

if its PVars, they get deleted automatically upon Disconnect. If they are normal variables, for vehicle you can use PlayerVariable[playerid] = INVALID_VEHICLE_ID; to set its vaule to invalid, or you could set the value to -1. not 0, but -1