06.03.2018, 20:16
[15:59:59] [debug] Run time error 4: "Array index out of bounds"
[15:59:59] [debug] Attempted to read/write array element at negative index -1
[15:59:59] [debug] AMX backtrace:
[15:59:59] [debug] #0 000fa8b4 in public Spawn (0) from kopie.amx
[15:59:59] [debug] Attempted to read/write array element at negative index -1
[15:59:59] [debug] AMX backtrace:
[15:59:59] [debug] #0 000fa8b4 in public Spawn (0) from kopie.amx
Код:
forward Spawn(playerid);
public Spawn(playerid)
{
if(GSkin[PGang[playerid]][GangLvl[playerid]-1] > 0)
{
SetPlayerSkin(playerid, GSkin[PGang[playerid]][GangLvl[playerid]-1]);
}
if(GSpawnX[PGang[playerid]] != 0.0 && GSpawnY[PGang[playerid]] != 0.0 && GSpawnZ[PGang[playerid]] != 0.0)
{
SetPlayerPos(playerid, GSpawnX[PGang[playerid]], GSpawnY[PGang[playerid]], GSpawnZ[PGang[playerid]]);
}
new hex[MAX_PLAYERS];
hex[playerid] = HexToInt(GColor[PGang[playerid]]);
SetPlayerColor(playerid, hex[playerid]);
}


