[HOWTO] SetPlayerMoney function
#1

Here I show you how to do a "setplayermoney" if you do not want to include "dutils";

pawn Код:
new moneyfirst[MAX_PLAYERS];
stock SetPlayerMoney(playerid,moneyafter) {
 moneyfirst[playerid]=moneyafter;
 GivePlayerMoney(playerid,moneyafter-GetPlayerMoney(playerid));
}
You add this anywhere, but in not any public or stocks.

Credits: DracoBlue for the code.
Reply
#2

Quote:
Originally Posted by Biscottinis
Here I show you how to do a "setplayermoney" if you do not want to include "dutils";

pawn Код:
new moneyfirst[MAX_PLAYERS];
stock SetPlayerMoney(playerid,moneyafter) {
 moneyfirst[playerid]=moneyafter;
 GivePlayerMoney(playerid,moneyafter-GetPlayerMoney(playerid));
}
You add this anywhere, but in not any public or stocks.

Credits: DracoBlue for the code.
Why are you putting it here, if you didnt make it....
Reply
#3

plus, this code isn't even complete lol.
Reply
#4

Quote:
Originally Posted by Pandabeer1337
plus, this code isn't even complete lol.
Yeah I see it now, LOOL
Reply
#5

pawn Код:
stock SetPlayerMoney(playerid, cash)
{
  ResetPlayerMoney(playerid);
  return GivePlayerMoney(playerid, cash);
}


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)