19.03.2010, 19:23
Hi,
I searched on ****** and forums, but i cant find an topic about this (if you know one just give the link).
This is what i want. (i mean the fence doesen't need to open with an command i mean you just will be teleported to the other side, like Los Santos Prison (LSP) in (LSRP)
Example: there is an gate you type /enter and you and you car will be teleported to the other side of the fence
Current code:
But it has some problems you see
i need to define all the vehicle models, so is there a way that you can teleport with every vehicle i dont want to define every vehicle model.
Second when you teleport you will be spawned next to your car is there a way you teleport back in to your car, plus the passengers.
I searched on ****** and forums, but i cant find an topic about this (if you know one just give the link).
This is what i want. (i mean the fence doesen't need to open with an command i mean you just will be teleported to the other side, like Los Santos Prison (LSP) in (LSRP)
Example: there is an gate you type /enter and you and you car will be teleported to the other side of the fence
Current code:
Код:
if(strcmp(cmd, "/enter2", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SetPlayerPos(playerid, -1833.2200, -16.1694, 15.1172);// zoek
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(currentveh, vehx, vehy, vehz);
SetVehiclePos(371, -1833.2200, -16.1694, 15.1172);
return 1;
}
}
return 1;
}
Код:
SetVehiclePos(371, -1833.2200, -16.1694, 15.1172);
Second when you teleport you will be spawned next to your car is there a way you teleport back in to your car, plus the passengers.

