Put Player In Vehicle Problem / DestroyVehicle Timer - 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: Put Player In Vehicle Problem / DestroyVehicle Timer (
/showthread.php?tid=71644)
Put Player In Vehicle Problem / DestroyVehicle Timer -
Alec24 - 02.04.2009
pawn Код:
case 3: //Get My Truck
{
new pTruck;
TruckType[playerid] = dini_Int(udb_encode(PlayerName), "TruckType");
pTruck = AddStaticVehicle(TruckType[playerid],-79.0896,-1127.8126,0.9531,66,-1,-1);
TogglePlayerControllable(playerid,1);
PutPlayerInVehicle(playerid,pTruck,0);
SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You Have Retrieved Your Truck.");
}
This code only seems to send the message but the vehicle doesnt actually spawn. It is an option on a menu thats why is case 3:
It should spawn the vehicle id thats in the file.
Re: Put Player In Vehicle Problem -
pen_theGun - 02.04.2009
Код:
pTruck = AddStaticVehicle(TruckType[playerid],-79.0896,-1127.8126,0.9531,66,-1,-1);
Quote:
Originally Posted by Wiki
This function can only create vehicles in the OnGameModeInit callback, and vehicles created with this function cannot be removed. Check CreateVehicle if you are interested in creating vehicles during game-runtime.
|
Re: Put Player In Vehicle Problem -
Pyrokid - 02.04.2009
Yeah use CreateVehicle. The parameters are different though so you'll have to adjust the line.
Re: Put Player In Vehicle Problem -
Alec24 - 03.04.2009
OK this is fine for geting into the vehicle but i dont want a respawn delay. So how do I DestroyVehicle when you have been out the pTruck for a minute or two. Do i need a timer somewhere?