how to Destroy vehicle
#1

Well please Tell Me that how to destroy immediately
a recently created vehicle when player exits from it pls help me

more inFolayer Spawns a vehicle By Vehicle Menu
Reply
#2

DestroyVehicle
https://sampwiki.blast.hk/wiki/DestroyVehicle
Reply
#3

create a variable and use a timer
Reply
#4

please gimme a example dudes
Reply
#5

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
Reply
#6

OnPlayerExitVehicle delete the car?
Reply
#7

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
Reply
#8

Код:
 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;
   }
Reply
#9

thxs dude
Reply
#10

But it doesn't Destroys car
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)