Problem anti lag-shot.
#1

I added an anti lagshot, works perfectly but I have a little problem:
An admin when using / aduty life and armor are full and do not falls but when I added this system when shooting in an admin / aduty ii decreases armor and do not want that.
Код:
new Float:Damage;
    if(AdminDuty[playerid]==0)
    GetPlayerArmour(damagedid, Damage);
    if(Damage > 0)
    {
        if(amount > Damage)
        {
            SetPlayerArmour(damagedid, 0);
        }
        else
        {
            SetPlayerArmour(damagedid, Damage-amount);
        }
    }
    else
    {
        GetPlayerHealth(damagedid, Damage);
        SetPlayerHealth(damagedid, Damage-amount);
    }
and Command /aduty:
Код:
if(strcmp(cmd, "/aduty", true) == 0)
 {
		if(IsPlayerConnected(playerid))
		{
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(AdminDuty[playerid]==0)
				{
					format(string, sizeof(string), "* Admin %s este acum disponibil sa va ajute. Folositi /report pentru ajutor TEHNIC.", sendername);
					SendClientMessageToAll(0xa9c4e4FF, string);
					AdminDuty[playerid] = 1;
					SetPlayerColor(playerid, 0x389CD1FF);
					SetPlayerHealth(playerid,99999);
					SetPlayerArmour(playerid,99999);
					GivePlayerWeapon(playerid, 38,99999);
				}
				else if(AdminDuty[playerid]==1)
				{
					format(string, sizeof(string), "* Admin %s este acum off-aduty.", sendername);
					SendClientMessageToAll(0xa9c4e4FF, string);
					AdminDuty[playerid] = 0;
					SetPlayerHealth(playerid,100);
					SetPlayerArmour(playerid,0);
					SetPlayerToTeamColor(playerid);
					ResetPlayerWeaponsEx(playerid);
				}
			}
		}
	}
Reply


Messages In This Thread
Problem anti lag-shot. - by myria - 08.06.2013, 19:15
Re: Problem anti lag-shot. - by random123 - 08.06.2013, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)