Player Protection. Like Protection when entering checkpoint. and interior.
#1

Heya Guys i want it so that players have protection only in 24/7 shops and Gun Shops. I have set
AllowInteriorWeapons(1); which allows but i want players to be protected too.

Also i wanted to know how to set protection when a player enters a checkpoint.

Cheers Guys.
Reply
#2

Use a timer that resets your health to 100 or something every 500ms or so and use a area checker...
Reply
#3

Don't use above method.

pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
   
    if(GetPlayerInterior(playerid) != 0)
    {
        new Float:health;
        GetPlayerHealth(playerid,health);
        SetPlayerHealth(playerid, health+amount);
    }
    else if(IsPlayerInCheckpoint(playerid))
    {
        new Float:health;
        GetPlayerHealth(playerid,health);
        SetPlayerHealth(playerid, health+amount);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)