Need help with teleports.
#1

I have working teleport dialog but what i need to do for getting it work with car?
small part

if(listitem == 0)
{
SetPlayerPos(playerid,1893.8665,-2328.5776,13.5469); //LS AIRPORT
}
else if(listitem == 1)
{
SetPlayerPos(playerid,-1530.5254,-78.3696,14.1484); // SF AIRPORT
}
Reply
#2

Код:
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
Reply
#3

PHP код:
if(GetPlayerState(playerid) == 2
{
SetVehiclePos(GetPlayerVehicleID(playerid),1893.8665,-2328.5776,13.5469);

else

SetPlayerPos(playerid,1893.8665,-2328.5776,13.5469);

if you use any interiors make sure you add

PHP код:
LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid)); 
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(playerid)); 
after you have set the player's interior and virtualworld
Reply
#4

Player didn't stay in vehicle what i should do?
Reply
#5

https://sampwiki.blast.hk/wiki/Function:PutPlayerInVehicle
Reply
#6

Quote:
Originally Posted by Gustavo_Araujo
Посмотреть сообщение
Код:
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
this^^^^
Reply
#7

PASTEBIN
Now its like this and not working. I am sorry i am scripting beginner.
Reply
#8

http://pastebin.com/RZTC6mC7

Check what i did.

If the server found out that the player was in a vehicle, it should do something, right? It should put the vehicle to the new position, okay?

"IF" player is in a vehicle, okay - do this:
Put the vehicle "here" (cordinates).
If the player is not in a vehicle, yes, then put the player "here".

see?

:P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)