[HELP] Money System
#2

You could do:

pawn Код:
new PlayerCash[MAX_PLAYERS];
Then like when you want to check the players cash:
Use a format string like so:
pawn Код:
new String[30];
format(String,sizeof(String),"Your Cash: %d",PlayerCash[playerid]);
SendClientMessage(playerid,COLOR,String);
You wont be able to use ammunation to buy weapons using this type so you will have to create a type of weapon purchasing system...
For example, if the M4 costs 500 this is how you would check it:
pawn Код:
if(PlayerCash[playerid] >= 500)
{
//give the player the m4 or do whatever because the players cash is above 500
PlayerCash[playerid] -= 500;//this will take the 500 from the players cash for purchasing the M4.
}
else
{
SendClientMessage(playerid,COLOR,"You do not have enough cash to buy a M4!");
}
That's pretty much the cash thing, but the bag thing, I wotn explain since i have to go now.
Reply


Messages In This Thread
[HELP] Money System - by sacman - 28.11.2009, 06:59
Re: [HELP] Money System - by miokie - 28.11.2009, 11:41
Re: [HELP] Money System - by sacman - 02.12.2009, 05:04
Re: [HELP] Money System - by Extremo - 02.12.2009, 06:30
Re: [HELP] Money System - by Doktor - 02.12.2009, 08:01
Re: [HELP] Money System - by sacman - 02.12.2009, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)