Detaljan opis problema:U zadnje vrijeme igracima krešuje ako dodju ispred burga ili yamagucija,ili kad udju na server izbaci mu 3 warninga i kasnije ako ode gdje po Los Santosu krešuje ga.
Ubacio sam crash detektor i pokazuje ovo:
#0 0004bd5c in public OnPlayerDeath (0x00000002, 0x0000ffff, 0x00000036) Dio koda:
public OnPlayerDeath(playerid, killerid, reason)
{
new string;
new name;
new name2;
new deathreason;
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, name2, sizeof(name2));
PlayerInfo = 100.0;
Mrtav = 1;
RealAmmo = 0;
PlayerMaxAmmo = 1;
PreTazerAmmo = 0;
DisarmInv(playerid);
SafeResetPlayerWeapons(playerid);
KillTimer(stopactimer);
stopactimer = SetTimerEx("resumeanticheat", 10000, false, "i", playerid);
MedicBill = 1;
OnMission = 0;
PlayerInfo = 0;
PlayerCuffed = 0;
DisarmInv(playerid);
if(Vucen != 9999)
{
KillTimer(VuciTimer[Vucen]);
IDVucenogIgraca[Vucen] = 9999;
Vucen = 9999;
}
if(IDVucenogIgraca != 9999)
{
KillTimer(VuciTimer);
IDVucenogIgraca = 9999;
Vucen[IDVucenogIgraca] = 9999;
}
if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
{
if(AntiDriveBy == 1)
{
new model = GetVehicleModel(GetPlayerVehicleID(killerid));
if(model != 520 || model != 425 || model != 432)
{
PlayerInfo ++;
if(PlayerInfo == 3)
{
format(string, sizeof(string), "%s (%d), kikovan od strane AntiCheata zbog DriveBy ubistva.", name2, killerid);
SendClientMessageToAll(COLOR_NICERED, string);
SCM(killerid,COLOR_LIGHTBLUE, "Kikovani ste od strane AntiCheata zbog DriveBy ubistva.");
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Excessive Drive By Killing",d,m,y,h,mi,s,name2);
KickLog(string);
Kick(killerid);
}
else
{
format(string, sizeof(string), "%s (%d), upozoren od strane AntiCheata zbog DriveBy ubistva..", name2, killerid);
SendClientMessageToAll(COLOR_NICERED, string);
SCM(killerid,COLOR_LIGHTBLUE, "Upozoreni ste od strane AntiCheata zbog DriveBy ubistva.");
format(string, sizeof(string), ": %s je uradio DB, upozoren je od strane AntiCheata.", name2);
SendAdminMessage(COLOR_YELLOW, string);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Warned by Anticheat - Reason: Driver drive-by kill.",d,m,y,h,mi,s);
AddPunishment(killerid, string);
}
}
}
}
if(killerid != INVALID_PLAYER_ID)
{
if(reason == 0) { deathreason = "Rukama"; }
else if(reason == 36 || reason == 35 || reason == 40 || reason == 16) { deathreason = "Explosion"; }
else if(reason == 18 || reason == 37) { deathreason = "Fire"; }
else if(reason == 51) { deathreason = "Explosion"; }
else if(reason == 50) { deathreason = "Heli-Kill"; }
else { GetWeaponName(reason, deathreason, sizeof(deathreason)); }
format(string, sizeof(string),": %s (%d) has been killed by %s (%d) - %s", name,playerid,name2,killerid,deathreason);
SendAdminMessage(COLOR_GREEN, string);
}
else
{
new text;
if(reason == 51) { text = "Explosion"; }
else if(reason == 53) { text = "Drowned"; }
else if(reason == 54) { text = "Collision"; }
else { text = "Death"; }
format(string, sizeof(string),": %s (%d) ubijen od strane servera. (%s)",name,playerid, text);
SendAdminMessage(COLOR_GREEN, string);
}
new playercash;
new victimteam = gTeam;
new Float:px,Float:py,Float:pz;
new killerteam = gTeam;
gPlayerSpawned = 0;
if(Decoding == 1)
{
Decoding = 0;
KillTimer(DecoderTimer);
HideDecoder(playerid);
SCM(playerid, COLOR_NICERED, "Izasli ste iz vozila, dekodiranje je stopirano!");
decodecode = 0;
Decoder = 0;
}
if(IsInBus == 1)
{
IsInBus = 0;
KillTimer(Timer1);
KillTimer(Timer2);
}
if(PlayerInfo >= 1) { PlayerInfo = 0; }
GetPlayerPos(playerid, px, py, pz);
if(PlayerInfo == 0 && PlayerInfo == 1)
{
TextDrawSetString(Textdraw64,"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Newbie Killer (9) ~n~~n~~w~osvojili ste ~g~$100");
ShowMedalja(killerid);
SafeGivePlayerMoney(killerid,100);
PlayerInfo = 1;
}
if(PlayerInfo == 0 && PlayerInfo == 75)
{
TextDrawSetString(Textdraw64,"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Serial Killer (10) ~n~~n~~w~osvojili ste ~g~$250");
ShowMedalja(killerid);
SafeGivePlayerMoney(killerid,250);
PlayerInfo = 1;
}
if(PlayerInfo == 0 && PlayerInfo == 150)
{
TextDrawSetString(Textdraw64,"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Assasin (11) ~n~~n~~w~osvojili ste ~g~$500");
ShowMedalja(killerid);
SafeGivePlayerMoney(killerid,500);
PlayerInfo = 1;
}
if(gPlayerUsingLoopingAnim)
{
gPlayerUsingLoopingAnim = 0;
TextDrawHideForPlayer(playerid,txtAnimHelper);
}
if(WantedPoints > 0)
{
new dstring;
new wanted = WantedPoints;
new diecash = 0;
while(WantedPoints > 0)
{
diecash += 500;
WantedPoints --;
}
format(dstring, sizeof(dstring), "Izgubili ste $%d zato sto ste umrli sa %d Wanted Poena.", diecash, wanted);
SCM(playerid, COLOR_YELLOW, dstring);
SafeGivePlayerMoney(playerid, - diecash);
PlayerInfo += 1;
}
if(PlayerInfo > 0) { SafeSetPlayerHealth(playerid, 100.0); }
else { SafeSetPlayerHealth(playerid, 50.0); }
gPlayerSpawned = 1;
SafeTime = 60;
Checked = 1;
PlayerGotSpottedRecently = 1;
SetTimerEx("ResetAcWarn",20000,false, "i", playerid);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
if(ProxDetectorS(20, killerid, playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo == 1||PlayerInfo == 1||PlayerInfo == 2||PlayerInfo ==2)
{
SCM(killerid, COLOR_YELLOW, "To je bilo drive-by ubistvo. Ne zloupotrevljavajte to.");
return 1;
}
SetPlayerCriminalEx(killerid,255,"Manslaughter");
return 1;
}
}
}
}
if(reason == 22)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 23)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
if(PlayerInfo == 0)
{
TextDrawSetString(Textdraw64,"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Silent Kill (0) ~n~~n~~w~osvojili ste ~g~$200 ~w~and ~p~50+ of ~y~Silenced Pistol Skill");
ShowMedalja(killerid);
PlayerInfo += 50;
SafeGivePlayerMoney(killerid,200);
PlayerInfo = 1;
}
}
if(reason == 24)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 25)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 26)
{
if(PlayerInfo >= 0 && PlayerInfo <= 800)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 27)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 28 || reason == 32)
{
if(PlayerInfo >= 0 && PlayerInfo <= 800)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 29)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 30)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(reason == 31)
{
if(PlayerInfo >= 0 && PlayerInfo <= 1000)
{
PlayerInfo += 2;
SetPlayerSkills(killerid);
}
}
if(gPlayerCheckpointStatus > 4 && gPlayerCheckpointStatus < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus = CHECKPOINT_NONE;
}
new caller = Mobile;
if(caller != 255)
{
if(caller < 255)
{
SCM(caller, COLOR_GRAD2, "** Veza se prekinula....");
CellTime = 0;
CellTime = 0;
Mobile = 255;
}
Mobile = 255;
CellTime = 0;
}
ClearCrime(playerid);
if(GettingCK < 999)
{
if(IsPlayerConnected(killerid))
{
if(OnCK < 999)
{
new killer;
new dier;
GetPlayerName(playerid, dier, sizeof(dier));
GetPlayerName(killerid, killer, sizeof(killer));
format(string, sizeof(string), "* %s has performed a Character Kill on you, you aren't able to play with this Character anymore.",killer);
SCM(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "** %s has Character Killed %s **",killer,dier);
CKLog(string);
BroadCast(COLOR_LIGHTRED, string);
PlayerInfo = 1;
if(GettingCK < 999) { GettingCK = 999; }
else if(OnCK < 999) { OnCK = 999; }
if(GettingCK < 999) { GettingCK = 999; }
else if(OnCK < 999) { OnCK = 999; }
KickPlayer = 1;
}
}
}
if(PlayerInfo > 0)
{
if(IsPlayerConnected(killerid))
{
if(gTeam == 10 || PlayerInfo == 8)
{
if(GoChase == playerid)
{
//ConsumingMoney = 1;
new killer;
GetPlayerName(killerid, killer, sizeof(killer));
SafeGivePlayerMoney(killerid, PlayerInfo);
format(string,128,"<< Hitman %s je ispunio ugovor i ubio %s Zarada: $%d >>",killer,name,PlayerInfo);
SendFamilyMessage(8, COLOR_YELLOW, string);
PlayerInfo = 0;
GotHit = 0;
GetChased = 999;
GoChase = 999;
}
}
}
}
if(victimteam >= 4)
{
if(IsPlayerConnected(killerid))
{
//new killer;
//GetPlayerName(killerid, killer, sizeof(killer));
new slice = 100; //$100
playercash = GetPlayerMoney(playerid);
if(gTeam != 2) { WantedPoints += 2; } //+ 2 wanted points
if(SafeTime <= 0)
{
if(gTeam != gTeam)
{
if(GetPlayerState(killerid) == 1)
{
PlayerInfo = PlayerInfo + 2;
}
else
{
PlayerInfo++;
}
PlayerInfo--;
}
}
if(((gTeam) == 1) || ((gTeam) == 3 && civnokill) || (gTeam == gTeam && gTeam != 4))
{
slice = 0;
}
if(((gTeam) != 4) && ((gTeam) == gTeam))//no team kill
{
slice = 0;
}
if(playercash > 0)
{
SafeGivePlayerMoney(playerid, -slice);
}
else
{
slice = slice+500;
}
//SafeGivePlayerMoney(killerid, slice);
//GameTextForPlayer(playerid, dmessage, 5000, 2);
PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
if(((gTeam) == 3) && reason != 49)
{
SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
}
else if(((gTeam) == 3) && reason == 49)
{
SetPlayerCriminalEx(killerid,255, "Hit And Run");
}
}
}
else if(victimteam == 2)
{
if(IsPlayerConnected(killerid))
{
//new killer;
//GetPlayerName(killerid, killer, sizeof(killer));
// Cop kill
PlayerInfo--;
if(gTeam == 2)//cops kill cop
{
//format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
SafeGivePlayerMoney(killerid, -suecost);
SafeGivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
}
else
{
//format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
}
if(gTeam >= 3)
{
WantedPoints += 2; //+ 2 wanted points
if(reason != 49)
{
SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
}
else if(reason == 49)
{
SetPlayerCriminalEx(killerid,255, "Hit And Run");
}
}
if(gTeam >= 5 && SafeTime <= 0)
{
if(GetPlayerState(killerid) == 1)
{
PlayerInfo = PlayerInfo+2;
}
else
{
PlayerInfo++;
}
WantedPoints+=2;
}
//BroadCast(COLOR_RED, string);
}
}
else if(victimteam == 3)
{
if(IsPlayerConnected(killerid))
{
//new killer;
//GetPlayerName(killerid, killer, sizeof(killer));
// Civ kill
if((gTeam) == 2)//cops kill civ
{
if(WantedLevel < 1)
{
//format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
SafeGivePlayerMoney(killerid, -suecost);
SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
}
}
else
{
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
WantedPoints += 2;
}
if(((gTeam) >= 3 || (gTeam) == 1) && reason != 49)
{
SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
}
else if(((gTeam) >= 3 || (gTeam) == 1) && reason == 49)
{
SetPlayerCriminalEx(killerid,255, "Hit And Run");
}
//BroadCast(COLOR_RED, string);
}
}
else if(victimteam == 1)
{
if(IsPlayerConnected(killerid))
{
//new killer;
//GetPlayerName(killerid, killer, sizeof(killer));
// Civ kill
if((gTeam) == 2)//cops kill civ
{
//format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
SafeGivePlayerMoney(killerid, -suecost);
SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
}
else if((gTeam) == 1)//med kill civ
{
//format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
SafeGivePlayerMoney(killerid, -suecost);
SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
}
else
{
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
}
if(((gTeam) == 4) && reason != 49)
{
SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
}
else if(((gTeam) == 3) && reason == 49)
{
SetPlayerCriminalEx(killerid,255, "Hit And Run");
}
//BroadCast(COLOR_RED, string);
}
}
if(victimteam >= 3 && WantedPoints > 0 && killerteam == 2)
{
SetPlayerFree(playerid,killerid, "Got Killed");
}
if(BusrouteEast != 0 || BusrouteWest != 0)
{
if(BusrouteEast != 0) BusrouteEnd(playerid, BusrouteEast);
else if(BusrouteWest != 0) BusrouteEnd(playerid, BusrouteWest);
else BusrouteEnd(playerid, 0);
}
if(FarmerVar != 0)
{
FarmerVar = 0;
DisablePlayerCheckpoint(playerid);
}
if(DrugFarmerVar != 0)
{
DrugFarmerVar = 0;
DisablePlayerCheckpoint(playerid);
}
if(SmugglerWork != 0)
{
SmugglerWork = 0;
DisablePlayerCheckpoint(playerid);
}
SetRealMoney(playerid, ScriptMoney);
SetPlayerColor(playerid,0xBBBBBB00);
SafeResetPlayerWeapons(playerid);
if(IsBeingSpeced == 1)//If the player being spectated, dies, then turn off the spec mode for the spectator.
{
TogglePlayerSpectating(spectatorid,0);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
}
if(usingcarwash == playerid)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
usingcarwash = -1;
UpdateDynamic3DTextLabelText(entrancetext, 0x008B00FF, "Niko trenutno ne pere kola.\nCena: $150 (/carwash)");
}
if((PlayerInfo == 0 && PlayerInfo == 0 || PlayerInfo == 4 || PlayerInfo == 4
|| PlayerInfo == 9 || PlayerInfo == 17 || PlayerInfo == 17 || PlayerInfo == 10
|| PlayerInfo == 10 || PlayerInfo == 7) && GoChase != playerid)
{
if((PlayerInfo >= 1 || WantedPoints >= 1 || WantedLevel >= 1 || PlayerInfo >= 1) && IsACop(killerid) || PlayerInfo >= 1338)
{
return 1;
}
TogglePlayerControllable(killerid, 0);
PlayerInfo = 1;
ResetPlayerWeapons(killerid);
SafeResetPlayerWeapons(killerid);
if(PlayerInfo == 1)
{
PlayerInfo = 1;
PlayerInfo += 600;
}
DMName = name2;
SetTimerEx("kicktimer",3000,false,"i",killerid);
}
WantedPoints = 0;
WantedLevel = 0;
killerid = INVALID_PLAYER_ID;
return 1;
}
