Take Money away?
#1

GivePlayerMoney(playerid, -10000);


would that make the player have 10000 less, if not how do i do this?
Reply
#2

i don't know if that would work.... just try

if it doesn't this schould do it:
Код:
new oldmoney, newmoney;
oldmoney = GetPlayerMoney(playerid);
newmoney = oldmoney - 10000;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, newmoney);
Reply
#3

Quote:
Originally Posted by campkz
GivePlayerMoney(playerid, -10000);


would that make the player have 10000 less, if not how do i do this?
yeah that's right
Reply
#4

Код:
new money = GetPlayerMoney(playerid);
GivePlayerMoney(playerid,money-1000);
Reply
#5

Quote:
Originally Posted by [AC
Etch ]
Код:
new money = GetPlayerMoney(playerid);
GivePlayerMoney(playerid,money-1000);
That's the long and useless way. GivePlayerMoney allows you to take money, or give money to a user. So there's no point of using GetPlayerMoney then giving them $1000 less. The function is called GivePlayerMoney, not SetPlayerMoney.
Reply
#6

Quote:
Originally Posted by [AC
Etch ]
Код:
new money = GetPlayerMoney(playerid);
GivePlayerMoney(playerid,money-1000);
That would give the player however much money he has AND THEN subtract 1000, so it's doubling their cash and subtracting 1000.


GivePlayerMoney gives money, not sets it.
Reply
#7

Quote:
Originally Posted by Beaver07
Quote:
Originally Posted by campkz
GivePlayerMoney(playerid, -10000);


would that make the player have 10000 less, if not how do i do this?
yeah that's right
wats wrong with what he put in the first place?
Reply
#8

Strange

pawn Код:
GivePlayerMoney(playerid, -1000);
Works for me lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)