22.02.2016, 06:07
trying to make so i can enter with vehicle but wont work, mabye u guys can help me.
PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
for(new g = 0; g < sizeof(GarageInfo); g++)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,GarageInfo[g][gEnterX],GarageInfo[g][gEnterY],GarageInfo[g][gEnterZ]))
{
if(GetPlayerVirtualWorld(playerid) == GarageInfo[g][gEWorld] && GetPlayerInterior(playerid) == GarageInfo[g][gEInt])
{
if(GarageInfo[g][gLocked] == 0)
{
if(GarageInfo[g][gOwned] == 0) return SendClientMessage(playerid, COLOR_GREY, "You can't enter a un-owned garage.");
LoadObjectsForPlayer(playerid);
PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
Streamer_UpdateEx(playerid, GarageInfo[g][gExitX],GarageInfo[g][gExitY],GarageInfo[g][gExitZ], GarageInfo[g][gInterior]);
SetPlayerPos(playerid,GarageInfo[g][gExitX],GarageInfo[g][gExitY],GarageInfo[g][gExitZ]);
SetPlayerInterior(playerid,GarageInfo[g][gInterior]);
SetPlayerVirtualWorld(playerid,g+100);
LoadAreaPl(playerid, 1, g);
SetTimerEx("Streamer_Update", 300, false, "i", playerid);
SetVehiclePos(GetPlayerVehicleID(playerid),GarageInfo[g][gEnterX],GarageInfo[g][gEnterY],GarageInfo[g][gEnterZ]);
}
else SendClientMessage(playerid,COLOR_LIGHTRED,"Garage is locked.");
}
}
}