I've used the GetPlayerDynamicAreas function of Incognito Streamer Plugin, but if i use the variable where i've put the value of GetPlayerDynamicAreas, give me errors:
Код:
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(839) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(839) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(840) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(842) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(852) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(853) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(855) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(859) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(863) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(865) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(867) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(874) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(877) : error 033: array must be indexed (variable "areaid")
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(889) : error 017: undefined symbol "areaid"
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(891) : error 017: undefined symbol "areaid"
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(892) : error 017: undefined symbol "areaid"
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(894) : error 017: undefined symbol "areaid"
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(894) : error 017: undefined symbol "areaid"
C:\Users\DarK_FeneR\Desktop\M3 SAMP\filterscripts\gangDK96.pwn(827) : warning 203: symbol is never used: "zoneid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
18 Errors.
Код:
forward IsPlayerInGangZone();
public IsPlayerInGangZone()
{
new string[255], zoneid;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(IsPlayerInAnyDynamicArea(playerid))
{
if(PlayerInfo[playerid][Invader] == false)
{
new areaid[MAX_ZONES];
PlayerInfo[playerid][Invader] = true;
GetPlayerDynamicAreas(playerid, areaid, MAX_ZONES);
zoneid = areaid;
new gangid = PlayerInfo[playerid][GangID];
if(gangid != ZoneInfo[zoneid][OfGangID] && gangid != -1 && GetPlayerVirtualWorld(playerid) == 0) Invaders[gangid][zoneid]++; //Aggiunta di un invasore
if(Invaders[gangid][zoneid] == MembersForConq)
{
if(ZoneInfo[zoneid][OfGangID] != gangid)
{
//---- Se gli invasori sono sufficienti (3) Parte il timer per far conquistare la gangzone agli invasori
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[playerid][GangID] == gangid)
{
SendClientMessage(i, GangInfo[gangid][Colour], "State conquistando la zona");
}
}
GangZoneFlashForAll(ZoneInfo[zoneid][OfGangID], GangInfo[gangid][Colour]);
if(ZoneInfo[zoneid][OfGangID] != -1)
{
GangTimer[gangid][zoneid] = SetTimerEx("ConquistaGZ", 60000*2, false, "ii", zoneid, gangid);
}
else
{
GangTimer[gangid][zoneid] = SetTimerEx("ConquistaGZ", 30000, false, "ii", zoneid, gangid);
}
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][GangID] == ZoneInfo[zoneid][OfGangID] && PlayerInfo[playerid][GangID] != ZoneInfo[zoneid][OfGangID] && PlayerInfo[i][GangID] != -1)
{
SendClientMessage(i, GangInfo[ZoneInfo[zoneid][OfGangID]][Colour], "Una vostra zona и sotto attacco");
format(string, sizeof(string), "X: %f, Y: %f, Area ID: %d", ZoneInfo[zoneid][PosX1], ZoneInfo[zoneid][PosY1], areaid);
if(IsPlayerAdmin(i)) SendClientMessage(i, COLOR_VERDE, string);
}
}
}
}
//---- Nome della gangzone
if(ZoneInfo[zoneid][OfGangID] != -1)
{
format(string, sizeof(string), "%s", GangInfo[ZoneInfo[zoneid][OfGangID]][GangName]);
GameTextForPlayer(playerid, string, 1000, 1);
}
}
}
else
{
if(PlayerInfo[playerid][Invader] == true)
{
PlayerInfo[playerid][Invader] = false;
new gangid = PlayerInfo[playerid][GangID];
if(Invaders[gangid][zoneid] == MembersForConq)
{
KillTimer(GangTimer[gangid][zoneid]); //---- Kill del timer per conquistare la gangzone
GangZoneStopFlashForAll(ZoneInfo[zoneid][ID]);
}
if(gangid != ZoneInfo[zoneid][OfGangID] && gangid != -1 && GetPlayerVirtualWorld(playerid) == 0) Invaders[gangid][zoneid]--; //---- Togliere un invasor
}
}
}
}
the fs don't work... don't check the zones in this way