Is there a GivePlayerVehicle?
#5

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
do you know how to create an vehicle ?
Anyways there isnt an "GivePlayerVehicle" command, but you can do this:

pawn Код:
new Float:x,Float:y,Float:z; //saving temporary xy-z positions of player
GetPlayerPos(playerid,x,y,z); //getting player's position and saving them in the floats.

new veh; //temporary thing to save vehicleID in which is your created vehicle.
veh = AddStaticVehicle(vehiclemodelid,x,y,z); //creating the vehicle and saving vehicleID in veh

PutPlayerInVehicle(playerid,veh,0); //putting player in the vehicle as driver (seat 0)
wont work.. where are the colors..?

use this..

pawn Код:
new Float:XPOS, Float: YPOS, Float: ZPOS;
GetPlayerPos(playerid, XPOS,YPOS,ZPOS);

new veh;

veh = CreateVehicle(/*Veh Model*/, XPOS,YPOS,ZPOS, -1, -1, 60); //Will delete after exiting vehicle 60 seconds.

PutPlayerInVehicle(playerid, veh, 0);

And gamer, check wiki on AddStaticVehicle VS CreateVehicle.

https://sampwiki.blast.hk/wiki/AddStaticVehicle
https://sampwiki.blast.hk/wiki/CreateVehicle
Reply


Messages In This Thread
Is there a GivePlayerVehicle? - by seifo - 05.09.2010, 00:13
Re: Is there a GivePlayerVehicle? - by willsuckformoney - 05.09.2010, 00:17
Re: Is there a GivePlayerVehicle? - by gamer931215 - 05.09.2010, 00:18
Re: Is there a GivePlayerVehicle? - by seifo - 05.09.2010, 00:23
Re: Is there a GivePlayerVehicle? - by DiddyBop - 05.09.2010, 00:46
Re: Is there a GivePlayerVehicle? - by gamer931215 - 05.09.2010, 09:31

Forum Jump:


Users browsing this thread: 1 Guest(s)