public OnPlayerDeath(playerid, killerid, reason) { if( IsPlayerConnected( killerid ) ) { if( IsPlayerConnected( GetPVarInt( playerid, "LastKilled" ) ) && GetPVarInt( playerid, "LastKilled" ) == killerid ) { if( ( GetPVarInt( playerid, "LastKilledTickcount" ) - GetTickCount( ) ) < 500 ) { SetPVarInt( playerid, "LastKilledTick", GetPVarInt( playerid, "LastKilledTick" ) + 1 ); if( GetPVarInt( playerid, "LastKilledTick" ) > 1 ) Kick( playerid ); } SetPVarInt( playerid, "LastKilledTickcount", GetTickCount( ) ); } SetPVarInt( playerid, "LastKilled", killerid ); } if(gettime() - GetPVarInt(playerid,"PlayerLastDeath") < 1) Ban(playerid); SetPVarInt(playerid,"PlayerLastDeath",gettime());*/ //EndfunAntiFakeKill SendDeathMessage(killerid, playerid, reason); TotalKills[killerid]++; TotalDeaths[playerid]++; new file[100],Name[MAX_PLAYER_NAME],Ip[16],name[MAX_PLAYER_NAME]; new KilledByName[MAX_PLAYER_NAME]; GetPlayerName(giveplayerid, name, sizeof(name)); GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerName(killerid,KilledByName,sizeof(KilledByName)); WhoKilledYou[playerid] = KilledByName; GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name); if(IsPlayerConnected(killerid)) { //SetPlayerWantedLevel(killerid, (GetPlayerWantedLevel(killerid) + 1)); GameTextForPlayer(killerid,"~w~+2 Score~R~~N~+2 kill~N~ ~g~+1000$", 5000, 1); SetPlayerScore(killerid,GetPlayerScore(killerid)+2); } //SetPlayerWantedLevel(playerid, 0); if( DMZone[killerid] >= 1) { GivePlayerMoney(killerid, 1000); GivePlayerMoney(playerid, -1000); SetPlayerScore(playerid,GetPlayerScore(playerid)-1); // GameTextForPlayer(playerid, "~r~~N~~N~~N~~N~~N~~N~YOUR KILLER~N~~W~RESPAWN AFTER ~R~5 ~W~SECONDS..", 5000, 5); PlayCrimeReportForPlayer(killerid, killerid, 3); } if( DMZone[killerid] == 0) { GivePlayerMoney(killerid, 1000); GivePlayerMoney(playerid, -1000); SetPlayerScore(playerid,GetPlayerScore(playerid)-1); PlayCrimeReportForPlayer(killerid, killerid, 3); // GameTextForPlayer(playerid, "~r~~N~~N~~N~~N~~N~~N~YOUR KILLER~N~~W~RESPAWN AFTER ~R~5 ~W~SECONDS..", 5000, 5); } return 1; }
[14:43:45]+ [debug] AMX backtrace: [14:43:45]+ [debug] #0 00033ff4 in public OnPlayerDeath (0x00000000, 0x0000ffff, 0x000000ff) from SPA.amx [14:43:45]+ [death] Mahdi died 255 [14:43:49]+ [debug] Run time error 4: "Array index out of bounds" [14:43:49]+ [debug] Accessing element at index 65535 past array upper bound 499 [14:43:49]+ [debug] AMX backtrace: [14:43:49]+ [debug] #0 00033ff4 in public OnPlayerDeath (0x00000000, 0x0000ffff, 0x000000ff) from SPA.amx [14:43:49]+ [death] Mahdi died 255
The version for the plugins sscanf and crashdetect is old. It may also be an old version for the rest of the plugins that doesn't say the version in the console so make sure that every plugin and include is updated.
Crashdetect: https://github.com/Zeex/samp-plugin-...ases/tag/v4.12 Sscanf: https://sampforum.blast.hk/showthread.php?tid=120356 |
[12:34:14]+ [debug] Run time error 5: "Invalid memory access" [12:34:14]+ [debug] AMX backtrace: [12:34:14]+ [debug] #0 00006da0 in public OnPlayerConnect () from AdminSystem.amx
Problem with Connection , after death (SPA is my GM) , thats causing crash to my server please help.
Код:
[12:40:49]+ [join] ShuffleLP has joined the server (5:212.185.222.106) [12:40:49]+ [debug] Run time error 5: "Invalid memory access" [12:40:49]+ [debug] AMX backtrace: [12:40:49]+ [debug] #0 00006da0 in public OnPlayerConnect () from AdminSystem.amx [12:41:06]+ [debug] Run time error 4: "Array index out of bounds" [12:41:06]+ [debug] Accessing element at index 65535 past array upper bound 499 [12:41:06]+ [debug] AMX backtrace: [12:41:06]+ [debug] #0 00033ff4 in public OnPlayerDeath (0x00000002, 0x0000ffff, 0x000000ff) from SPA.amx |
// OnPlayerDeath:
if (killerid != INVALID_PLAYER)
{
// code for killerid
}