SA-MP Forums Archive
Help Me Please.. quickly deleted vehicle Following the establishment of - 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: Help Me Please.. quickly deleted vehicle Following the establishment of (/showthread.php?tid=73281)



Help Me Please.. quickly deleted vehicle Following the establishment of - user226 - 13.04.2009

Hi!
Here I have a code:
pawn Код:
if (strcmp("/cmd", cmdtext, true, 10) == 0)
  {
  new Float:X,Float:Y,Float:Z,Float:Angle, carid;
    GetPlayerPos(playerid,X,Y,Z);
    GetPlayerFacingAngle(playerid,Angle);
  carid = GetPlayerVehicleID(playerid);
    carid = CreateVehicle(ID,X,Y,Z,Angle,Color1,color2,1);
    PutPlayerInVehicle(playerid,carid,0);
    TogglePlayerControllable(playerid,true);
  return 1;
    }
It creates a Vehicle
Please tell me how to do:
Here the player has created a car
When quit of vehicle she quickly deleted

Probably need a timer, but how to do it?
Please help me...
I Poor know pawno...


Re: Help Me Please.. quickly deleted vehicle Following the establishment of - luxeon - 13.04.2009

OnPlayerStateChange() detect if he exited the vehicle, and there do: DeleteVehicle(id);
Dont forget to get its id before deleting it, or it will crash, like:
pawn Код:
new id = getPlayerVehID()
DeleteVehicle(id);
Luxeon


Re: Help Me Please.. quickly deleted vehicle Following the establishment of - user226 - 13.04.2009

please please write in details
I am not aware pawno .. ;(((((((


Re: Help Me Please.. quickly deleted vehicle Following the establishment of - user226 - 14.04.2009

Luxeon, please write in details


Re: Help Me Please.. quickly deleted vehicle Following the establishment of - user226 - 14.04.2009