please help meee!!!!!!
#1

Hi all!!!

sorry if i posted in other direction, i dont know english very well.

I need help for my rp server!!!

When player has little health (for example: 15 or 10) he became cuted and he cant move. how can i do this for my server? (sorry for my bad english and thank you very much for help me).
tujituji1 is online now Report Post Edit/Delete Message
Reply
#2

Search the script for GetPlayerHealth.
Reply
#3

Hello..

What do you want? I don't understand what kind of script you wanna make

As far as i can understand.
you need a little FS or something when a player have 10 or 15 hp than he will be frozen (he can't move anymore)
is this what u need??

Kind Regards!
Jordy.Kiesebrink
[In-Game] [JJ]Jordy
Reply
#4

yes!!!!!!!!!!!1
Reply
#5

he became cuted and froze? what the hell is that spose to mean?
Reply
#6

its been maded for you already
Reply
#7

At the top:
pawn Код:
new hfroze[MAX_PLAYERS];
forward HealthCheck();
At OnGameModeInit
pawn Код:
SetTimer("HealthCheck", 2000, true);
anywhere:
pawn Код:
public HealthCheck()
{
    new Float:health;
    for(new i=0; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected(i))
        {
            if(hfroze[i] == 1)
            {
                GetPlayerHealth(i, health);
                SetPlayerHealth(i, health+2);
                if(health >= 15)
                {
                    TogglePlayerControllable(i, 1);
                    hfroze = 0;
                }
            }else{
                GetPlayerHealth(i, health);
                if(health < 15)
                {
                    hfroze = 1;
                    TogglePlayerControllable(i, 0);
                    SendClientMessage(i, 0x999999AA, "Wait until your health increased to over 15hp");
                }
            }
        }
    }
    return 1;
}
at OnPlayerConnect
pawn Код:
hfroze[playerid] = 0;
I hope that helped you and it works how you wanted it..
I just wrote it up so I don't know whether there is any error in it.. if there is, please tell me...

(you can also use SetTimerEx, but I wouldn't advice to do so..)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)