07.06.2012, 18:06
Hello,
I made a /getin command to get with your vehicle into an garage (this is for PD garage (different VW because of lagg))
and an /getout to get back in VW 0 and place you with your car at LSPD.
but it don't teleport the car with you, only yourself...
I made a /getin command to get with your vehicle into an garage (this is for PD garage (different VW because of lagg))
and an /getout to get back in VW 0 and place you with your car at LSPD.
but it don't teleport the car with you, only yourself...
pawn Код:
command(getin, playerid, params[])
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0 ,1588.1971, -1635.9882, 13.3903)) //Door 0
{
SetPlayerPos(playerid, 2313.7886, 2447.9248, 2.8986);
SetPlayerInterior(playerid, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(playerid, 1);
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2313.7886, 2447.9248+2, 2.8986);
SetVehicleVirtualWorld(tmpcar, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(playerid));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(playerid));
}
}
return 1;
}
command(getout, playerid, params[])
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0 ,2313.7886, 2447.9248, 2.8986)) //Door 0
{
SetPlayerPos(playerid, 1588.1971, -1635.9882, 13.3903);
SetPlayerInterior(playerid, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(playerid, 0);
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1588.1971, -1635.9882+2, 13.3903);
SetVehicleVirtualWorld(tmpcar, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(playerid));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(playerid));
}
}
return 1;
}