Need the money in bank - 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: Need the money in bank (
/showthread.php?tid=418816)
Need the money in bank -
Fernado Samuel - 26.02.2013
Removed, thanks for the help!
Re: Need the money in bank -
sscarface - 26.02.2013
PHP код:
forward PropertyPayout();
public PropertyPayout()
{
new str[64];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerProps[i] > 0)
{
GivePlayerMoney(i, PlayerInfo[i][bank]);
format(str, 64, "You earned $%d, from your properties!", EarningsForPlayer[i]);
SendClientMessage(i, 0xFFFF00AA, str);
}
}
}
}
or
PHP код:
forward PropertyPayout();
public PropertyPayout()
{
new str[64];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerProps[i] > 0)
{
GivePlayerMoney(i, PlayerInfo[playerid][bank]);
format(str, 64, "You earned $%d, from your properties!", EarningsForPlayer[i]);
SendClientMessage(i, 0xFFFF00AA, str);
}
}
}
}
try both.
Re: Need the money in bank -
Vince - 26.02.2013
No.
pawn Код:
PlayerInfo[i][bank] += EarningsForPlayer[i];