SetPlayerScore problem..
#1

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?
Reply
#2

Could you post the code ?
Never heard of it but the code itself would help.
Reply
#3

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?
Reply
#4

MY FAULT

Edit: Search your script for another SetPlayerScore. Or do you have any FS using this function?
Reply
#5

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?
Reply
#6

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?
Reply
#7

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.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)