Posts: 155
Threads: 52
Joined: Apr 2009
Reputation:
0
Hello, i did some mod, but when i press "tab"
on the score like there is the score XD
but i want it to show me the money that the player have
how can i do that?
Posts: 103
Threads: 2
Joined: Jan 2007
Reputation:
0
OnGameModeInit:
SetTimer("CashScoreUpdate",1000,true);
below main:
public CashScoreUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new CashScore = GetPlayerMoney(i);
SetPlayerScore(i, CashScore);
}
return true;
}
above main:
forward CashScoreUpdate();
Posts: 1,293
Threads: 6
Joined: Jul 2008
Reputation:
0
Looping 200 people a second in many cases is unavoidable, but running as many timers as you have players every second is worse.
Posts: 246
Threads: 17
Joined: Jul 2008
Reputation:
0
when you don't have 200 playerslots you can use for MAX_PLAYERS your amount of Player Slots. And you can set the Timer to 5000ms or higher