05.11.2012, 10:32
I have a problem with /enter cmd for my garage yeah i can enter it but only when i am not in a car.If i am in a car i cant enter the garage.The Codes.
Help will be appreciated.And you will be reputed,Thanks in advance.
Код:
for(new idx=1; idx<MAX_GARAGES; idx++) // Dynamic Garages
{
if(IsPlayerInRangeOfPoint(playerid, 2, GarageInfo[idx][gX], GarageInfo[idx][gY], GarageInfo[idx][gZ]))
{
if(!GarageInfo[idx][gStatus] && PlayerInfo[playerid][pGarage] != idx && PlayerInfo[playerid][pVGarage] != idx) return SendClientMessage(playerid, COLOR_GREY, "This garage is locked by its owner.");
format(string, sizeof(string), "* %s pushes the shutter and enters the garage.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, idx+500);
if(GarageInfo[idx][gLevel] == 1)
{
SetPlayerPos(playerid, -72.5507,-20.3314,972.5516);
SetPlayerFacingAngle(playerid, 267.0980);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 1);
}
else if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1515.2551,-1666.3148,14.0469);
}
return 1;
}
}

