21.02.2019, 04:44
Code:
[debug] Run time error 4: "Array index out of bounds" [debug] Attempted to read/write array element at index 11 in array of size 11 [debug] AMX backtrace: [debug] #0 0016c4b0 in ?? (0) in Gamemode.amx [debug] #1 000b1c78 in public OnDialogResponse (0, 2, 1, -1, 22695856) in Gamemode.amx
pawn Code:
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if(!strlen(inputtext)) return ShowDialog(playerid, dialogid);
new password[64 + 1];
SHA256_PassHash(inputtext, ACCOUNT_INFO[playerid][ac_SALT], password, sizeof password);
if(!strcmp(password, ACCOUNT_INFO[playerid][ac_PASS], false))
{
LoadCharacterData(playerid);
LoadPlayerBankAccountData(playerid);
LoadPlayerToysData(playerid);
LoadPlayerPocketData(playerid);
LoadPlayerPhoneData(playerid);
LoadPlayerGPSData(playerid);
LoadPlayerObjectsData(playerid);
LoadPlayerVehicles(playerid);
LoadPlayerSkills(playerid);
LoadPlayerWorks(playerid);
LoadPlayerMisc(playerid);
LoadPlayerWeaponsData(playerid);
LoadPlayerCrewInfo(playerid);
SetPlayerScore(playerid, ACCOUNT_INFO[playerid][ac_LEVEL]);
PLAYER_TEMP[playerid][pt_DOUBT_CHANNEL_TIME] = gettime();
ResetPlayerWeapons(playerid);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, CHARACTER_INFO[playerid][ch_CASH]);
SetPlayerFightingStyle(playerid, CHARACTER_INFO[playerid][ch_FIGHT_STYLE]);
SetPlayerHealthEx(playerid, CHARACTER_INFO[playerid][ch_HEALTH]);
SetPlayerArmourEx(playerid, CHARACTER_INFO[playerid][ch_ARMOUR]);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerNormalColor(playerid);
StopAudioStreamForPlayer(playerid);
SetSpawnInfo(playerid, NO_TEAM, CHARACTER_INFO[playerid][ch_SKIN], CHARACTER_INFO[playerid][ch_POS][0], CHARACTER_INFO[playerid][ch_POS][1], CHARACTER_INFO[playerid][ch_POS][2], CHARACTER_INFO[playerid][ch_ANGLE], 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid, CHARACTER_INFO[playerid][ch_INTERIOR]);
PLAYER_TEMP[playerid][pt_BAD_LOGIN_ATTEMP] = 0;
TogglePlayerSpectatingEx(playerid, false);
TogglePlayerControllableEx(playerid, false);
SendClientMessageEx(playerid, -1,"ЎHello {e53c3c}%s!, {FFFFFF} last connection: %s.", PLAYER_TEMP[playerid][pt_RP_NAME], ACCOUNT_INFO[playerid][ac_LAST_CONNECTION]);
}
else
{
PLAYER_TEMP[playerid][pt_BAD_LOGIN_ATTEMP] ++;
if(PLAYER_TEMP[playerid][pt_BAD_LOGIN_ATTEMP] > MAX_BAD_LOGIN_ATTEMPS) return Kick(playerid);
ShowDialog(playerid, dialogid);
}
return 1;
}