10.02.2017, 10:13
Bugged Code
Nothing happens if I type the /enter command near a druglab.
But this is working and it is the same:
PHP код:
for(new i = 0; i < MAX_DLABS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, DrugLabs[i][EntranceX], DrugLabs[i][EntranceY], DrugLabs[i][EntranceY]))
{
SetPlayerPos(playerid, DrugLabs[i][ExitX], DrugLabs[i][ExitY], DrugLabs[i][ExitZ]);
SetPlayerInterior(playerid, DrugLabs[i][Interior]);
SetPlayerVirtualWorld(playerid, DrugLabs[i][VirtualWorld]);
TogglePlayerControllable(playerid, 0);
SetTimerEx("IntLoading", 2500, false, "i", playerid);
PlayerTextDrawShow(playerid, entranceloading[0][playerid]);
PlayerTextDrawShow(playerid, entranceloading[1][playerid]);
}
}
But this is working and it is the same:
PHP код:
for(new i = 0; i < MAX_BUILDINGS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, BuildingInfo[i][bEntranceX], BuildingInfo[i][bEntranceY], BuildingInfo[i][bEntranceZ]))
{
new string[65];
SetPlayerPos(playerid, BuildingInfo[i][bExitX], BuildingInfo[i][bExitY], BuildingInfo[i][bExitZ]);
SetPlayerInterior(playerid, BuildingInfo[i][bInt]);
SetPlayerVirtualWorld(playerid, BuildingInfo[i][bVW]);
TogglePlayerControllable(playerid, 0);
SetTimerEx("IntLoading", 2500, false, "i", playerid);
PlayerTextDrawShow(playerid, entranceloading[0][playerid]);
PlayerTextDrawShow(playerid, entranceloading[1][playerid]);
if(PlayerInfo[playerid][pLanguage] == 1)
{
format(string, sizeof(string), "You have entered the building with ID: "COL_WHITE"%d", BuildingInfo[i][ID]);
SendClientMessage(playerid, COLOR_GREEN, string);
break;
}
else
{
format(string, sizeof(string), "Ai intrat in cladirea cu IDul: "COL_WHITE"%d", BuildingInfo[i][ID]);
SendClientMessage(playerid, COLOR_GREEN, string);
break;
}
}
}