PutPlayerInVehicle
#1

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);
Reply
#2

not 598... thats model. You need the ID of vehicle

veh = createvehicle(..)
so use veh
Reply
#3

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);
Reply
#4

what if i don't want to use color 1 and 2 ?

[edit] and respray time ?
Reply
#5

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

thanks all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)