[FilterScript] My First FS :Hungry System (with Progress Bar) nice for RP
#1

//COMMANDS
/eat

//ScreenShot
V1


V2


//Download Link
V1.0 http://www.mediafire.com/?c393nva11b6bf6c
V1.1 http://www.mediafire.com/?kx28mnjr0pa9bxe
Update:http://www.mediafire.com/download.php?9mdnn0npc9aa049
V2.0 http://www.mediafire.com/?o0d3pnmmbf52dqx

//How To Install
1.extract hunger.pwn and .amx to filterscript folder
2.extract Stats folder to your scriptfiles folder
3.add "hunger" to the server.cfg at the filterscript line
4.done, test it

//Bug
If you found bug please post reply

//Credits
To Include Maker:
Dini.inc
ZCMD.inc
ProgressBar.inc

//Update
V2.0 : New Design, New Command System(/eat [burger/pizza/chicken])
Reply
#2

Screen IG plz,
tks
Reply
#3

Quote:
Originally Posted by Smail_Smith
View Post
Screen IG plz,
tks
I will upload now wait for a minute
Reply
#4

For that i was looking right now . Thanks a lot .
Reply
#5

Not bad, not an original idea but I don't recall ever seeing a FS like this before. Nice job


Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 49 seconds.

FFFFFFFFFFF-
Reply
#6

Awesome!! Really needed this, Rep+++
Reply
#7

Quote:
Originally Posted by christiand
View Post
For that i was looking right now . Thanks a lot .
Quote:
Originally Posted by Cena44
View Post
Awesome!! Really needed this, Rep+++
Thanks
Reply
#8

One suggestion :

At eat you should have something like :

Code:
if( health < 100 )
	{
		if(IsPlayerInRangeOfPoint(playerid, 20, 366.0248, -73.3478, 1001.5078))
		{
	    	GivePlayerMoney(playerid, -50);
	    	SetPlayerHealth(playerid,health+6);
	    	SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])+15);
			return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Burger Enjoy The Food");
		}
		if(IsPlayerInRangeOfPoint(playerid, 50, 372.3520, -131.6510, 1001.4922))
		{
	    	GivePlayerMoney(playerid, -70);
	    	SetPlayerHealth(playerid,health+15);
	    	SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])+25);
			return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Pizza Enjoy The Food");
		}
		if(!IsPlayerInRangeOfPoint(playerid, 50, 365.7158, -9.8873, 1001.8516))
		{
	    	GivePlayerMoney(playerid, -35);
	    	SetPlayerHealth(playerid,health+4);
	    	SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])+12);
			return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Fried Chicken Enjoy The Food");
		}
	}
	else
	{
	    SendClientMessage(playerid, COLOR_BLUE, "Your hp is full.");
	}
or will get abused .
Reply
#9

Quote:
Originally Posted by christiand
View Post
One suggestion :

At eat you should have something like :

Code:
if( health < 100 )
	{
		if(IsPlayerInRangeOfPoint(playerid, 20, 366.0248, -73.3478, 1001.5078))
		{
	    	GivePlayerMoney(playerid, -50);
	    	SetPlayerHealth(playerid,health+6);
	    	SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])+15);
			return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Burger Enjoy The Food");
		}
		if(IsPlayerInRangeOfPoint(playerid, 50, 372.3520, -131.6510, 1001.4922))
		{
	    	GivePlayerMoney(playerid, -70);
	    	SetPlayerHealth(playerid,health+15);
	    	SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])+25);
			return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Pizza Enjoy The Food");
		}
		if(!IsPlayerInRangeOfPoint(playerid, 50, 365.7158, -9.8873, 1001.8516))
		{
	    	GivePlayerMoney(playerid, -35);
	    	SetPlayerHealth(playerid,health+4);
	    	SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])+12);
			return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Fried Chicken Enjoy The Food");
		}
	}
	else
	{
	    SendClientMessage(playerid, COLOR_BLUE, "Your hp is full.");
	}
or will get abused .
oke i'll edit this, thanks

UPDATED!!!
Reply
#10

Awsome dude! +3rep to you.
Reply
#11

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
Awsome dude! +3rep to you.
Wow Thanks Man
Reply
#12

when i use this fs in my Gamemode the hunger bar doesnt show up...
Reply
#13

Quote:
Originally Posted by burnuk
Посмотреть сообщение
when i use this fs in my Gamemode the hunger bar doesnt show up...
have you add this?
pawn Код:
public OnPlayerSpawn(playerid)
{
    new file[256],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),"Stats/%s.txt",n);
    if(!dini_Exists(file))
    {
        dini_Create(file);
        dini_IntSet(file,"Hunger",100);
    }
    hungry[playerid] = CreateProgressBar(528.00, 115.00, 76.50, 8.50, 0x0000BBAA, 100.0);
    ShowProgressBarForPlayer(playerid, hungry[playerid]);
    TextDrawShowForPlayer(playerid, Hungry);
    SetProgressBarValue(hungry[playerid], dini_Int(file,"Hunger"));
    return 1;
}
Reply
#14

i have Freeroam server, so i don't need it, but good job anyway!
Reply
#15

Very nice . Good job - and nice idea.
Reply
#16

Quote:
Originally Posted by pasha97
Посмотреть сообщение
i have Freeroam server, so i don't need it, but good job anyway!
Quote:
Originally Posted by Dr4mX123
Посмотреть сообщение
Very nice . Good job - and nice idea.
thanks
Reply
#17

Quote:
Originally Posted by RipLagger
Посмотреть сообщение
have you add this?
pawn Код:
public OnPlayerSpawn(playerid)
{
    new file[256],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),"Stats/%s.txt",n);
    if(!dini_Exists(file))
    {
        dini_Create(file);
        dini_IntSet(file,"Hunger",100);
    }
    hungry[playerid] = CreateProgressBar(528.00, 115.00, 76.50, 8.50, 0x0000BBAA, 100.0);
    ShowProgressBarForPlayer(playerid, hungry[playerid]);
    TextDrawShowForPlayer(playerid, Hungry);
    SetProgressBarValue(hungry[playerid], dini_Int(file,"Hunger"));
    return 1;
}
i use it as a filterscript, the lines you gave me are already in the fs. but still its not showing, and i tried to add it in my GM but i got some errors when compiling it.
Reply
#18

Quote:
Originally Posted by burnuk
Посмотреть сообщение
i use it as a filterscript, the lines you gave me are already in the fs. but still its not showing, and i tried to add it in my GM but i got some errors when compiling it.
give the error code
Reply
#19

Wew di post juga di forum selamat ya ibnu
Reply
#20

none of rp released made on forums are Unique .But this is AWW
though such system like this have been released earlier too but still kinda new!

Nice idea +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)