Function don't have effect - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Function don't have effect (
/showthread.php?tid=547727)
Function don't have effect -
osman2571 - 24.11.2014
how to convert this
Код:
new ebill = (PlayerInfo[i][pBankMoney]/9000)*(PlayerInfo[i][pLevel]);
to
example:
Код:
SafeGivePlayerMoney(playerid, -500)* (PlayerInfo[playerid][pLevel]);
but this doesn't work
Re: Function don't have effect -
dominik523 - 24.11.2014
Are you looking for this?
pawn Код:
stock SafeGivePlayerMoney(playerid, amount)
{
PlayerInfo[playerid][pBankMoney] += amount;
SetPlayerMoney(playerid, PlayerInfo[playerid][pBankMoney]);
return 1;
}
AW: Re: Function don't have effect -
osman2571 - 24.11.2014
Quote:
Originally Posted by dominik523
Are you looking for this?
pawn Код:
stock SafeGivePlayerMoney(playerid, amount) { PlayerInfo[playerid][pBankMoney] += amount; SetPlayerMoney(playerid, PlayerInfo[playerid][pBankMoney]); return 1; }
|
yes but * player level
Re: Function don't have effect -
dominik523 - 24.11.2014
This?
pawn Код:
SafeGivePlayerMoney(playerid, -PlayerInfo[playerid][pLevel]*500);
Or maybe this?
pawn Код:
stock SafeGivePlayerMoney(playerid, amount)
{
PlayerInfo[playerid][pBankMoney] += amount * PlayerInfo[playerid][pLevel];
SetPlayerMoney(playerid, PlayerInfo[playerid][pBankMoney]);
return 1;
}
Re: Function don't have effect -
Rdx - 24.11.2014
SafeGivePlayerMoney(playerid, PlayerInfo[playerid][pLevel]);
and
new ebill = (PlayerInfo[playerid][pBankMoney]/9000)*(PlayerInfo[playerid][pLevel]);
SafeGivePlayerMoney(playerid, ebill);