Damage reflection issue
#1

I am building a server on which fighting won't be allowed (racing server).
Weapon restriction is a problem, because people will always use hacks to get weapons and there will be moments when no staff member will be present. So I am trying to make all the damage inflicted to be reflected to the attacker.

I am trying this simple code, but I keep getting tag mismatch warnings on 2 lines. the bolded ones.
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
    new health = GetPlayerHealth(playerid,health);
    new health2 =  floatsub(health, amount);
    SetPlayerHealth(playerid, health2);
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    SetPlayerHealth(playerid, 100);
}
So the question is: what mistake is causing those 2 warnings?
Reply
#2

PHP код:
new Float:health;
GetPlayerHealth(playerid,health);
new 
Float:health2;
health2 floatsub(healthamount); 
Reply
#3

thanks..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)