[HELP] Health and Armour for Admin PROBLEM
#1

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!
Reply
#2

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.
Reply
#3

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.
Reply
#4

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

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
Reply
#6

okej...I will try that! Thanks
Reply
#7

Код:
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.
Reply
#8

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

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"
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)