07.03.2015, 12:16
Quote:
Can someone please write a basic stock for GetPlayerArea or something? This is too complicated for me to understand.
My script doesn't have overlapping areas so returning multiple results is not an issue. |
Код:
new playerarea[MAX_PLAYERS]; GetPlayerArea(playerid) return IsPlayerConnected(playerid) ? playerarea[playerid] : -1; public OnPlayerConnect(playerid) { playerarea[playerid] = -1; return 1; } public OnPlayerEnterDynamicArea(playerid, areaid) { playerarea[playerid] = areaid; return 1; } public OnPlayerLeaveDynamicArea(playerid, areaid) { playerarea[playerid] = -1; return 1; }