20.09.2013, 23:11
Hello everyone,
I started to make an AntiCheat for my gamemode,
The AntiCheat works fine, but when players shoot player, or player jump from an hige place, the script see it like an cheat.
I think to use OnPlayerGiveDamage (tell me if it incorrect)
I dont understand how to check if the amount of damage is Health or an Armour, And how to do it.
my functions is:
HELP & Sry about my English.
edit:
I did something like:
But it's isn't work.
I started to make an AntiCheat for my gamemode,
The AntiCheat works fine, but when players shoot player, or player jump from an hige place, the script see it like an cheat.
I think to use OnPlayerGiveDamage (tell me if it incorrect)
I dont understand how to check if the amount of damage is Health or an Armour, And how to do it.
my functions is:
Код:
CDM_SetPlayerHealth(playerid, Float:health); CDM_SetPlayerArmour(playerid, Float:armour);
edit:
I did something like:
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) { new Float:p[2]; GetPlayerHealth(damagedid, p[0]); GetPlayerArmour(damagedid, p[1]); if(p[1] != 0) CDM_SetPlayerArmour(damagedid, p[1]-amount); else if(!p[1]) CDM_SetPlayerHealth(damagedid, p[0]-amount); return 1; }