28.11.2009, 11:41
You could do:
Then like when you want to check the players cash:
Use a format string like so:
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:
That's pretty much the cash thing, but the bag thing, I wotn explain since i have to go now. 
pawn Код:
new PlayerCash[MAX_PLAYERS];
Use a format string like so:
pawn Код:
new String[30];
format(String,sizeof(String),"Your Cash: %d",PlayerCash[playerid]);
SendClientMessage(playerid,COLOR,String);
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!");
}


