02.10.2014, 06:22
(
Последний раз редактировалось biker122; 02.10.2014 в 08:02.
)
I somehow managed to fix this, the problem was in the Worlds array.
But now, a new bug appears with the pickups...
The pickup isn't responding when I enter them.
But now, a new bug appears with the pickups...
The pickup isn't responding when I enter them.
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for(new i = 1; i <= HousesCreated; i++)
{
if(pickupid == HouseInfo[i][HouseExitPickup])
{
KickFromHouse(playerid, i);
return 1;
}
else if(pickupid == HouseInfo[i][HouseEnterPickup])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(HouseInfo[i][hOwned] == 0)
{
SendClientMessage(playerid, COLOR_BLUE, "» Use /buyhouse to buy this house!");
return 1;
}
if(pInfo[playerid][JustLeft] == 1) return 0;
else if(HouseInfo[i][hOwned] == 1)
{
if(HouseInfo[i][hLocked] == 1)
{
if(strcmp(name, HouseInfo[i][hOwner]) != 0)
{
if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid, COL_RED, "ERROR: "CYELLOW"This house is currently locked!");
}
}
SetPlayerHousePos(playerid, i);
SetPlayerVirtualWorld(playerid, HouseInfo[i][hWorld]);
pInfo[playerid][InHouseID] = i;
break;
}
else continue;
}
}
return 1;
}