03.05.2014, 06:48
Hey guys i made a garage system for my server but the problem is i am confused how can i take the vehicle inside the garage yet its only possible for the player to enter the garage heres my command please modify it as so if the players in a vehicle the player enters the garage along with the vehicle
pawn Код:
CMD:entergarage(playerid, params[])
{
new done, string[128];
if(IsPlayerInRangeOfPoint(playerid, 3, GarageInfo[idx][gX], GarageInfo[idx][gY], GarageInfo[idx][gZ]))
{
new idx;
idx = GetPlayerVirtualWorld(playerid)-500;
if(!done && idx < MAX_GARAGES && GarageInfo[idx][gLevel])
{
format(string, sizeof(string), "** %s pushes the shutter up and exits the garage.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SetPlayerPos(playerid, -72.5507,-20.3314,972.5516);
SetPlayerFacingAngle(playerid, 267.0980);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 1);
done = 1;
}
}
return 1;
}