SetPlayerScore problem.. - 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: SetPlayerScore problem.. (
/showthread.php?tid=89808)
SetPlayerScore problem.. -
SiJ - 04.08.2009
Hey,
I don't know why but all players' scores in samp client window (when you select server and see all players in the right) are 0.
I have public which sets player score to its money every minute, and my score in-game are shown ok, but not in client window.. why?
Re: SetPlayerScore problem.. -
XtremeChio - 04.08.2009
Could you post the code ?
Never heard of it but the code itself would help.
Re: SetPlayerScore problem.. -
SiJ - 04.08.2009
pawn Код:
public OnGameModeInit()
{
SetTimer("UpdateScore",58000,1);
//Other stuff...
}
public UpdateScore()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerScore(i,GetPlayerMoney(i));
}
return 1;
}
Would IsPlayerConnected(i) change something?
Re: SetPlayerScore problem.. -
Dark_Kostas - 04.08.2009
MY FAULT
Edit: Search your script for another SetPlayerScore. Or do you have any FS using this function?
Re: SetPlayerScore problem.. -
MenaceX^ - 04.08.2009
No not really it can't check the money of not connected people.
Quote:
Originally Posted by [DK
AzaxYo ]
Quote:
Originally Posted by Justas [SiJ
]
public OnGameModeInit()
{
SetTimer("UpdateScore",58000,1);
//Other stuff...
}
public UpdateScore()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerScore(i,GetPlayerMoney(i));
}
return 1;
}
Would IsPlayerConnected(i) change something?
|
Why GetPlayerMoney? Do you mean maybe GetPlayerScore? 
|
The level will never change if he does so.
if the level is 0, it sets again to 0.
If it's 1, it sets again to 1.
What's the point?
Re: SetPlayerScore problem.. -
SiJ - 04.08.2009
Quote:
Originally Posted by MenaceX^
No not really it can't check the money of not connected people.
Quote:
Originally Posted by [DK
AzaxYo ]
Quote:
Originally Posted by Justas [SiJ
]
public OnGameModeInit()
{
SetTimer("UpdateScore",58000,1);
//Other stuff...
}
public UpdateScore()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerScore(i,GetPlayerMoney(i));
}
return 1;
}
Would IsPlayerConnected(i) change something?
|
Why GetPlayerMoney? Do you mean maybe GetPlayerScore? 
|
The level will never change if he does so.
if the level is 0, it sets again to 0.
If it's 1, it sets again to 1.
What's the point?
|
Maybe samp cannot show scores in client which value are very big (cause sometimes it is 1 000 000 )
EDIT: I just had score 500 and it showed ok.. And now I have 5000 and it shows 0.. So maybe it just cannot show big values?
Re: SetPlayerScore problem.. -
Dark_Kostas - 04.08.2009
Did you see your script or your FS if you use SetPlayerScore somewhere else?
EDIT: Score is working for over 99999999

I tried it on my script.
Re: SetPlayerScore problem.. -
SiJ - 04.08.2009
Quote:
Originally Posted by [DK
AzaxYo ]
Did you see your script or your FS if you use SetPlayerScore somewhere else?
EDIT: Score is working for over 99999999  I tried it on my script.
|
No other FSs uses SetPlayerScore
And I just tried setting score to 500 - worked, to 5000 - didn't worked.. :S