PutPlayerInVehicle - 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: PutPlayerInVehicle (
/showthread.php?tid=471034)
PutPlayerInVehicle -
AnonScripter - 20.10.2013
1- This code doesn't put me in LV Police car, it puts me in a ranger.
2- how to put the player in the vehicle in his position, because this code puts me in a ranger and not in my position, it puts me in SF -.-
pawn Код:
PutPlayerInVehicle(playerid, 598, 0);
Re: PutPlayerInVehicle -
whatthefuck123 - 20.10.2013
not 598... thats model. You need the ID of vehicle
veh = createvehicle(..)
so use veh
Re: PutPlayerInVehicle -
MBilal - 20.10.2013
you can do like this
Код:
new myCar[MAX_PLAYERS];
new Float:pX,Float:pY,Float:pZ,Float:pw;
GetPlayerPos(playerid, pX,pY,pZ);
GetPlayerFacingAngle(playerid, pw);
myCar[playerid] = CreateVehicle(415, pX, pY, pZ, pw, 0, 0, 0);
PutPlayerInVehicle(playerid, myCar[playerid], 0);
GameTextForPlayer(playerid,"~w~Cheetah",3000,1);
Re: PutPlayerInVehicle -
AnonScripter - 20.10.2013
what if i don't want to use color 1 and 2 ?
[edit] and respray time ?
Re: PutPlayerInVehicle -
Dolby - 20.10.2013
Quote:
Originally Posted by AnonScripter
what if i don't want to use color 1 and 2 ?
[edit] and respray time ?
|
You can use a global var, example:
pawn Код:
new Police_Car;
//OnGameModeInit
Police_Car = AddStaticVehicle(...);
//OnCommand
PutPlayerInVehicle(playerid,Police_Car,0);
Re: PutPlayerInVehicle -
AnonScripter - 20.10.2013
thanks all