1 problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 1 problem (
/showthread.php?tid=643937)
1 problem -
LovelySoomro - 30.10.2017
in my server i found some hackers they hack score and also hack other player,s score with fake kill and its very anoyed me
suggestion plz :>
Re: 1 problem -
DimaShift - 30.10.2017
test this. anti fake kill
Код:
new bool:AntiFakeKill[MAX_PLAYERS];
public OnPlayerSpawn(playerid){
AntiFakeKill[playerid] = false;
return true;
}
public OnPlayerDeath(playerid, killerid, reason){
if(AntiFakeKill[playerid] == true) return Kick(playerid);
AntiFakeKill[playerid] = true;
return true;
}
public OnPlayerDisconnect(playerid, reason){
AntiFakeKill[playerid] = false;
return true;
}
Re: 1 problem -
Konstantinos - 30.10.2017
Technically, score cannot be hacked as it is server-side. It's the bonus your server gives for each kill.
What DimaShift posted is not used often anymore, most fake kill cheats "respawn" the player at the same position he was so the best way is to store the player who gave damage to the player (OnPlayerTakeDamage) and the tick (gettime) so you can then check in OnPlayerDeath if the killer was not the last player gave damage and take action. Afterwards, reset your variables.
I used to auto-ban with some circumstances (
killerid and
playerid being the same, or multiple deaths in a second). For the rest, just stop your code execution to ignore them.
Re: 1 problem -
DimaShift - 30.10.2017
Quote:
Originally Posted by Konstantinos
Technically, score cannot be hacked as it is server-side. It's the bonus your server gives for each kill.
What DimaShift posted is not used often anymore, most fake kill cheats "respawn" the player at the same position he was so the best way is to store the player who gave damage to the player (OnPlayerTakeDamage) and the tick (gettime) so you can then check in OnPlayerDeath if the killer was not the last player gave damage and take action. Afterwards, reset your variables.
I used to auto-ban with some circumstances (killerid and playerid being the same, or multiple deaths in a second). For the rest, just stop your code execution to ignore them.
|
OnPlayerTakeDamage can be disabled by cheat (NOP)!
Re: 1 problem -
Konstantinos - 30.10.2017
Quote:
Originally Posted by DimaShift
OnPlayerTakeDamage can be disabled by cheat (NOP)!
|
Which means the cheater never took damage so it still works - I just tested it right now. I also never suggested to use one method over the other (before you edit your post), I have 4 different methods so I can effectively catch all of those different versions.
Re: 1 problem -
DimaShift - 30.10.2017
Quote:
Originally Posted by Konstantinos
Which means the cheater never took damage so it still works - I just tested it right now. I also never suggested to use one method over the other (before you edit your post), I have 4 different methods so I can effectively catch all of those different versions.
|
Put here if you have something good.