16.08.2018, 12:23
I have problem. I tried to search for it, but I couln't find any solutions.
When player die this happens in my console:
This is the code from script:
Thanks for anyone who knows right solution.
When player die this happens in my console:
Код:
[debug] Run time error 4: "Array index out of bounds" [debug] Attempted to read/write array element at index 65535 in array of size 1000 [debug] AMX backtrace: [debug] #0 00038a48 in public OnPlayerDeath (0, 65535, 255) from SCRP.amx
Код:
public OnPlayerDeath(playerid, killerid, reason) { taser[playerid] = false; GiveTaserAgainTimer[playerid] = 0; lastWeapon[playerid] = 0; rp[killerid]++; GameTextForPlayer(killerid, "~y~+1 RP", 3000, 6); if(bounted[playerid] > 499) { if(playerid != killerid) { GivePlayerCash(killerid, bounted[playerid]); SCM(playerid, COLOR_LIGHTRED, "Ubijen si! Tvoja cijena za glavu je ukinuta."); SCM(killerid, COLOR_LIGHTBLUE, "Ubio si igraca s cijenom za njegovu/njezinu glavu."); bounted[playerid] = 0; } } if(robbing == 1) { KillTimer(robbingtimer); robbing = 0; new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(killerid, name, sizeof(name)); format(string, sizeof(string), "[VIJESTI]: Banka je spaљena od pljackanja. Pomogao u tome: %s (%i)", name,killerid); SendClientMessageToAll(COLOR_YELLOW, string); } if(Player[playerid][police] == 1) { if(playerid != killerid) { SetPlayerWantedLevel(killerid, 4); SCM(killerid, COLOR_LIGHTRED, "Ubio si policajca! Dobio si wanted level 4!"); } } zaposlen[playerid] = 0; DisablePlayerCheckpoint(playerid); if(gTime[playerid][firsttime] == 1) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(thisfile,sizeof(thisfile),mydata,name); dini_IntSet(thisfile,"firsttime",1); } return 1; }