SA-MP Forums Archive
[HELP] Health and Armour for Admin PROBLEM - 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] Health and Armour for Admin PROBLEM (/showthread.php?tid=304326)



[HELP] Health and Armour for Admin PROBLEM - c0GI - 18.12.2011

Hy guys..I want to all admins ALWAYS have a 100 HP and 100 Armour.....But I cant make that script!!! I want to be like a health and armour regenerator!! If somebody shoot admin with any gun, the HP and armour must automaticaly set to 100!!!! Can anywone do that for me PLEASE! I must have that script!


Re: [HELP] Health and Armour for Admin PROBLEM - Calgon - 18.12.2011

The best thing to do is to set the health of the admin to 10000 or 100000, this way the player's health is practically infinite. The same applies to armour.


Re: [HELP] Health and Armour for Admin PROBLEM - [ABK]Antonio - 18.12.2011

I'll show you what would probably work in 0.3d with ZCMD
pawn Код:
CMD:god(playerid)
{
    if(IsPlayerAdmin(playerid)) //Switch with your admin system
    {
        if(GetPVarInt(playerid, "God") != 1)
        {
            SetPVarInt(playerid, "God", 1);
            SendClientMessage(playerid, 0x00CC00, "God mode enabled.");
        }
        else
        {
            SetPVarInt(playerid, "God", 0);
            SendClientMessage(playerid, 0x00CC00, "God mode disabled.");
        }
   }
    else return SendClientMessage(playerid, 0xCC0000, "You don't have the required level to use this command.");
}
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(GetPVarInt(playerid, "God") == 1)
    {
        SetPlayerHealth(playerid, 100);
    }
}
This of course, is untested.


Re: [HELP] Health and Armour for Admin PROBLEM - Calgon - 18.12.2011

Antonio, your code is pointless. Setting the player's health to a high amount invokes 'god mode'.


Re: [HELP] Health and Armour for Admin PROBLEM - jamesbond007 - 18.12.2011

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
I'll show you what would probably work in 0.3d with ZCMD
pawn Код:
CMD:god(playerid)
{
    if(IsPlayerAdmin(playerid)) //Switch with your admin system
    {
        if(GetPVarInt(playerid, "God") != 1)
        {
            SetPVarInt(playerid, "God", 1);
            SendClientMessage(playerid, 0x00CC00, "God mode enabled.");
        }
        else
        {
            SetPVarInt(playerid, "God", 0);
            SendClientMessage(playerid, 0x00CC00, "God mode disabled.");
        }
   }
    else return SendClientMessage(playerid, 0xCC0000, "You don't have the required level to use this command.");
}
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(GetPVarInt(playerid, "God") == 1)
    {
        SetPlayerHealth(playerid, 100);
    }
}
what if minigun continues shooting or RPG TO THE FACE?? FUS RO DAH!!!

ye just set HP to 10000 on a timer or something


Re: [HELP] Health and Armour for Admin PROBLEM - c0GI - 18.12.2011

okej...I will try that! Thanks


Re: [HELP] Health and Armour for Admin PROBLEM - Basssiiie - 18.12.2011

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	if(success == 1)
	{
		SetPlayerHealth(playerid, 999999);
		SetPlayerArmor(playerid, 999999);
	}
	return 1;
}
Like Calgon said, this should make the admins immediately unkillable when they login into RCON.


Re: [HELP] Health and Armour for Admin PROBLEM - c0GI - 18.12.2011

okejj! Bassssiiie I will try that script! )) THANKS YOU VERY MUCK


Re: [HELP] Health and Armour for Admin PROBLEM - c0GI - 18.12.2011

Basssiiie that script didn't work! When I press F5, that show me THIS:
Код:
D:\Nikola i Marko\[BE] Balkan Evolution Role Play\gamemodes\gtarp.pwn(45432) : error 017: undefined symbol "playerid"
D:\Nikola i Marko\[BE] Balkan Evolution Role Play\gamemodes\gtarp.pwn(45433) : error 017: undefined symbol "playerid"



Re: [HELP] Health and Armour for Admin PROBLEM - PawnoQ - 18.12.2011

for me when i set a players health to 1000000 or smth. the person still can die, why?