Spawn Protection + Spawn Health Help (rep++)
#1

Hey Guys!
==> First Of All I want Spawn Protection for every player who spawn for 10 seconds. How can i dot it.
====> 2nd is that i have rank system. I want player which is on rookie rank get health only 75.00 and player who is on Brigadier rank (3rd rank) have 100 health + 10.00 armour on spawn and so on....
How can i do this??

Examples:
pawn Код:
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 150) rookie
     
if(GetPlayerScore(playerid) >= 150 && GetPlayerScore(playerid) < 300)
     
if(GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) < 450) Brigadier
Reply
#2

Add this below your defines:
pawn Код:
forward SpawnKill(playerid);
Add this under OnPlayerSpawn:
pawn Код:
SetPlayerHealth(playerid,99999);
        SetTimerEx("SpawnKill",10000,0,"i",playerid);
Add this anywhere in you script:
pawn Код:
public SpawnKill(playerid)
{
    SetPlayerHealth(playerid,100.0);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"SpawnKill Over!");
    return 1;
}
This was for Spawn Kill.
Reply
#3

Add this under OnPlayerSpawn:
pawn Код:
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 150) rookie
{
    SetPlayerHealth(playerid, 75);
}
if(GetPlayerScore(playerid) >= 150 && GetPlayerScore(playerid) < 300)
{
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid, 25);
}
if(GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) < 450) Brigadier
{
    SetPlayerHealth(playerid, 100);
    SetPlayerArmour(playerid, 50);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)