Deo skripte:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
if(InDM != 0)
{
for(new i = 0; i <= GetPlayerPoolSize(); i++)
{
new string;
if(InDM == 1)
{
format(string, sizeof(string), ""ROZA"(death)"BELA" %s "ROZA"was slain "BELA"%s.", GetName(killerid), GetName(playerid));
SCM(i, -1, string);
}
else if(InDM == 2)
{
format(string, sizeof(string), ""ROZA"(death)"BELA" %s "ROZA"was slain "BELA"%s.", GetName(killerid), GetName(playerid));
SCM(i, -1, string);
}
else if(InDM == 3)
{
format(string, sizeof(string), ""ROZA"(death)"BELA" %s "ROZA"was slain "BELA"%s.", GetName(killerid), GetName(playerid));
SCM(i, -1, string);
}
}
}
SendDeathMessage( killerid, playerid, reason );
PlayerInfo++;
PlayerInfo++;
SetPlayerScore(killerid, PlayerInfo );
PlayerInfo = PlayerInfo + 500;
ResetPlayerMoney(killerid); GivePlayerMoney(killerid, PlayerInfo );
PlayerInfo++; SavePlayer( killerid ); SavePlayer( playerid );
SendDeathMessage( INVALID_PLAYER_ID, playerid, reason );
PlayerInfo++; SavePlayer ( playerid );
}
Mrtva_Kamera = 1;
if(Mrtva_Kamera == 1)
{
Mrtva_Kamera = 0;
if(Ubijen_Kamera != INVALID_PLAYER_ID)
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
GameTextForPlayer(playerid, "Spawn is in 3 seconds!", 3000, 4);
SetTimerEx("Specaj_Igraca", 5000, false, "i", playerid);
}
else
{
TogglePlayerSpectating(playerid, 0);
}
new string, Name;
GetPlayerName(killerid, Name, sizeof(Name));
PlayerTotalKills++;
PlayerTotalKills = 0;
if(PlayerTotalKills == 3) {
format(string, sizeof(string), ""SVETLOPLAVA"(SPREE): "BELA"%s "SVETLOPLAVA"is on a "BELA"3 "SVETLOPLAVA"killing spree!", Name);
SCMTA(-1, string);
return 1;
}
if(PlayerTotalKills == 5) {
format(string, sizeof(string), ""SVETLOPLAVA"(SPREE): "BELA"%s "SVETLOPLAVA"is on a "BELA"5 "SVETLOPLAVA"killing spree!", Name);
SCMTA(-1, string);
return 1;
}
if(PlayerTotalKills == 8) {
format(string, sizeof(string), ""SVETLOPLAVA"(SPREE): "BELA"%s "SVETLOPLAVA"is on a "BELA"8 "SVETLOPLAVA"killing spree!", Name);
SCMTA(-1, string);
return 1;
}
if(PlayerTotalKills == 10) {
format(string, sizeof(string), ""SVETLOPLAVA"(SPREE): "BELA"%s "SVETLOPLAVA"is on a "BELA"10 "SVETLOPLAVA"killing spree!", Name);
SCMTA(-1, string);
return 1;
}
if(PlayerTotalKills == 15) {
format(string, sizeof(string), ""SVETLOPLAVA"(SPREE): "BELA"%s "SVETLOPLAVA"is on a "BELA"15 "SVETLOPLAVA"killing spree!", Name);
SCMTA(-1, string);
return 1;
}
return 1;
}Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
[20:16:20] Run time error 4: "Array index out of bounds"
[20:16:20] AMX backtrace:
[20:16:20] #0 0005fa10 in public WC_OnPlayerDeath (3, 65535, 55) from rdm.amx
[20:16:20] #1 0004defc in ?? (3, 0, 65535, 55, 0, 0) from rdm.amx
[20:16:20] #2 000398b0 in ?? (3, 0, -1082130432) from rdm.amx
[20:16:20] #3 00063b24 in public cmd_kill (3, 22860028) from rdm.amx
[20:16:20] #4 native CallLocalFunction () from samp03svr
[20:16:20] #5 00038778 in public OnPlayerCommandText (3, 22859996) from rdm.amx Slika/video ingame problema(obavezno ako je ingame problem): //
