04.07.2012, 04:03
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
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)
Now you can make your own functions to give/get/set money
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.
Make a per player global variable which will be used to get players' money or give them
pawn Код:
new playerMoney[MAX_PLAYERS];
(NOTE: This is just the variable, you will have to create the whole textdraw)
pawn Код:
new Text:moneyTD[MAX_PLAYERS];
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;
}