Needed help on formating Cash
#9

Like Vince said you cannot. But to get around this you can make your own money system, I'll give you some hints:

Make a per player global variable which will be used to get players' money or give them
pawn Код:
new playerMoney[MAX_PLAYERS];
Also make a textdraw that will be used to display cash for a player
(NOTE: This is just the variable, you will have to create the whole textdraw)
pawn Код:
new Text:moneyTD[MAX_PLAYERS];
Now you can make your own functions to give/get/set money
pawn Код:
// To give money
stock GiveMoney(playerid, amount)
{
    playerMoney[playerid] = playerMoney[playerid] + amount;
    TextDrawSetString(moneyTD[playerid], playerMoney[playerid]);
    return 1;
}
// To get a player's money
stock GetMoney(playerid)
{
    return playerMoney[playerid];
}

// Set cash ...
stock SetMoney(playerid, amount)
{
    playerMoney[playerid] = amount;
    TextDrawSetString(moneyTD[playerid], playerMoney[playerid]);
    return 1;
}
// Reset cash
stock ResetMoney(playerid)
{
    playerMoney[playerid] = 0;
    TextDrawSetString(moneyTD[playerid], playerMoney[playerid]);
    return 1;
}
Now you gotta replace (CTRL+H) GivePlayerMoney with GiveMoney, GetPlayerMoney with GetMoney and ResetPlayerMoney with ResetMoney. And when done you can simply use those functions to give, get, set or reset players' money.
Reply


Messages In This Thread
Needed help on formating Cash - by Tigerkiller - 03.07.2012, 15:29
Re: Needed help on formating Cash - by Vince - 03.07.2012, 15:34
AW: Needed help on formating Cash - by Tigerkiller - 03.07.2012, 15:36
Re: Needed help on formating Cash - by [MM]RoXoR[FS] - 03.07.2012, 16:49
Re: Needed help on formating Cash - by Vince - 03.07.2012, 17:13
Re: Needed help on formating Cash - by Roko_foko - 03.07.2012, 17:45
Re: Needed help on formating Cash - by [MM]RoXoR[FS] - 04.07.2012, 03:28
Re: Needed help on formating Cash - by Shelby - 04.07.2012, 03:40
Re: Needed help on formating Cash - by [KHK]Khalid - 04.07.2012, 04:03
Re: Needed help on formating Cash - by MP2 - 04.07.2012, 05:11

Forum Jump:


Users browsing this thread: 2 Guest(s)