Hunger system for NG:RP edit script
#1

Hello Guys,

I would to have Hunger system that likes on NG:RP, I use NG:RP script too. So if someone can help me, please reply here
Reply
#2

Ok, so when a player spawns you're going to want to set a timer and forward that player ID, make a function that then decreases the health by X value every X seconds / minutes. That way, it will eventually get to 0 and that player would die, or they would starve and eat food.

Example:

pawn Код:
forward Hunger(playerid);
public Hunger(playerid)
{
    SetPlayerHealth(playerid, GetPlayerHealth(playerid) --);
}

public OnPlayerSpawn(playerid)
{
    SetTimerEx("Hunger", 120000, true, "i", playerid); // sets the timer of hunger for every 2 minutes, the word true is the repeat value, and we forwaded the playerid
    return 1;
}
PS: Untested, just did it from my laptop.
Reply
#3

Can I talk you about this on skype? It's very important system and I need guide doing it
Reply
#4

Blah Blah.....






NG:RP script new version mysql .... contact b0ykut3.l0ve_f0r3v3r@yahoo.com
Reply
#5

k, Give me the script :3
Reply
#6

Can someone help me setup this code?

pawn Код:
forward Hunger(playerid);
public Hunger(playerid)
{
    SetPlayerHealth(playerid, GetPlayerHealth(playerid) --);
}

public OnPlayerSpawn(playerid)
{
    SetTimerEx("Hunger", 120000, true, "i", playerid); // sets the timer of hunger for every 2 minutes, the word true is the repeat value, and we forwaded the playerid
    return 1;
}
I mean, I need someone to fix the codes and send it back to me
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)