Spawning with a car!
#1

When i go to example /ls and I am in a car i didnt spawn the car just me.How to spawn with a car?
Reply
#2

just check if a player is in a vehicle and then teleport the car in that position and put the player inside it
Reply
#3

yes i am in a car but when i type /ls I am not with the car.
Reply
#4

use SetVehiclePos when you use SetPlayerPos too. or just get the vehicle id, tp the the vehicle to ls and PutPlayerInVehicle(playerid,vehicleid,0);
Reply
#5

I dont understand send a code or something please
Reply
#6

Код:
CMD:ls(playerid,params[])
{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	    new veh=GetPlayerVehicleID;
	    SetVehiclePos(veh,x,y,z+2);//coords of the lsplace
	    PutPlayerInVehicle(playerid,veh,0);
	}
	else
	{
	    SetPlayerPos(playerid,x,y,z);
	}
	return 1;
}
Reply
#7

before you do such complicated things,
start learning the basics
And RTFM
Reply
#8

Quote:
Originally Posted by sansko
Посмотреть сообщение
And RTFM
what the heck is RTFM?
Reply
#9

pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
    SetVehiclePos(vehicleid,Float:x,Float:y,Float:z);
}
else
{
    SetPlayerPos(playerid,Float:x,Float:y,Float:z);
}
You don't have to use PutPlayerInVehicle or anything, if you move the vehicle the player in it wont get out of it.
Reply
#10

Where to put this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)