Player's Money Is Their Score? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player's Money Is Their Score? (
/showthread.php?tid=98374)
Player's Money Is Their Score? -
DeltaAirlines12 - 20.09.2009
How do I make it so that a player's money is their score?
I have searched, but cant find anything, Thanks!
Re: Player's Money Is Their Score? -
» sTeVe - 20.09.2009
From the lvdm ....
![rolleyes](images/smilies/rolleyes.gif)
Say thanks to Jax
pawn Код:
forward MoneyGrubScoreUpdate();
new CashScoreOld;
public MoneyGrubScoreUpdate()
{
new CashScore;
new name[MAX_PLAYER_NAME];
//new string[256];
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof(name));
CashScore = GetPlayerMoney(i);
SetPlayerScore(i, CashScore);
if (CashScore > CashScoreOld)
{
CashScoreOld = CashScore;
//format(string, sizeof(string), "$$$ %s is now in the lead $$$", name);
//SendClientMessageToAll(COLOR_YELLOW, string);
}
}
}
}
Re: Player's Money Is Their Score? -
DeltaAirlines12 - 20.09.2009
Quote:
Originally Posted by » sTeVe
From the lvdm .... ![rolleyes](images/smilies/rolleyes.gif)
Say thanks to Jax
pawn Код:
forward MoneyGrubScoreUpdate();
new CashScoreOld;
public MoneyGrubScoreUpdate() { new CashScore; new name[MAX_PLAYER_NAME]; //new string[256]; for(new i=0; i<MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { GetPlayerName(i, name, sizeof(name)); CashScore = GetPlayerMoney(i); SetPlayerScore(i, CashScore); if (CashScore > CashScoreOld) { CashScoreOld = CashScore; //format(string, sizeof(string), "$$$ %s is now in the lead $$$", name); //SendClientMessageToAll(COLOR_YELLOW, string); } } } }
|
LOL, I'll say thanks to Jax, and Thanks to you too.