Help - 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: Help (
/showthread.php?tid=590917)
Help -
anassmaroc - 05.10.2015
Hi Guys i Need Help.
this is anti Godmod But how to make if Player Admin Don't Work i mean i use /onduty and the hp be :9999999
i want edit this Code +rep if u helped me
PHP код:
#include <a_samp>
#include <YSF> //r11
#undef MAX_PLAYERS
const MAX_PLAYERS = 500;
new ShotsTotal[MAX_PLAYERS], ShotsDoneEffect[MAX_PLAYERS];
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) //calling only with no cheat
{
if(!IsPlayerPaused(playerid) && IsPlayerControllable(playerid)) ShotsDoneEffect[playerid]++;
else { ShotsTotal[playerid] = 0; ShotsDoneEffect[playerid] = 0; }
return 1;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) //calling ALWAYS and BEFORE OnPlayerTakeDamage
{
if(hittype == BULLET_HIT_TYPE_PLAYER)
{
if(!IsPlayerPaused(hitid) && IsPlayerControllable(hitid))
{
ShotsTotal[hitid]++;
if(ShotsTotal[hitid] - ShotsDoneEffect[hitid] > 1)
{
Kick(hitid); //cheater
}
}
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
ShotsTotal[playerid] = 0;
ShotsDoneEffect[playerid] = 0;
return 1;
}
Re: Help -
Gammix - 05.10.2015
Under OnPlayerWeaponShot:
Код:
if(!IsPlayerPaused(hitid) && IsPlayerControllable(hitid) && ! IsPlayerAdmin(hitid))
Add a restriction there. Maybe you want to replace it with your own arrays/veriables.
Re : Help -
anassmaroc - 05.10.2015
:/ This Anti godmod don't Work can u Give me a Good one With what i told in top msg
Re: Help -
raizo - 05.10.2015
Here you go :
http://pastebin.com/11FP0xDe
Use this as a FilterScript
(P.s : Not made by me)