05.10.2015, 12:36
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
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;
}