PHP код:
//enter
if(strcmp(cmdtext, "/enter", true) == 0)
{
if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1)
{
if PlayerToPoint(5,playerid,1811.9972,-1310.2609,13.8875)
*then
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1820.2412,-1310.0238,-2.7739);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
SetPlayerPos(playerid,1820.2412,-1310.0238,-2.7739);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_1GREEN,"*** TuneGarage!");
}
}
return 1;
}
// exit
if(strcmp(cmdtext, "/exit", true) == 0)
{
if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1)
{
if PlayerToPoint(5,playerid,1820.2412,-1310.0238,-2.7739)
*then
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1811.9972,-1310.2609,13.8875);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
SetPlayerPos(playerid,1811.9972,-1310.2609,13.8875);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_1GREEN,"***City!");
}
}
return 1;
}
Try removing the player from the vehicle, then TP both the player and the vehicle to the location then set the vehicle of the player back to the vehicle.