SA-MP Forums Archive
Scores.. - 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: Scores.. (/showthread.php?tid=94340)



Scores.. - XxerykxX - 29.08.2009

I Have a one drift counter from LUBY its awesome but if i have drift points 1000 and bonus X5 i am getting 5000$ but the points still are not going to my score points... when i press TAB my scores are still zero

PS

i am making my own server from lvdm so can anybody help me pls??


Re: Scores.. - RSX - 29.08.2009

You need to add : SetPlayerScore(playerid,GetPlayerMoney(playerid)) or edit in that script, but i'm thinking, is that, the same guy i sold one map or not...


Re: Scores.. - XxerykxX - 29.08.2009

But Under what do i have to paste it in ??


Re: Scores.. - RSX - 29.08.2009

If you know hot to use it, make a timer, witch sets all players score to money amount they have..., function could be like this:
Код:
public RefreshScore()
{
	for(new w;w<MAX_PLAYERS;w++)
	{
		SetPlayerScore(w,GetPlayerMoney(w));
	}
}
You could run it for like every 1 or 2 seconds, or maybe 5 if your server is overflooded!


Re: Scores.. - XxerykxX - 29.08.2009

I think you didnt get me i dont want to have cash as scores just drift points as a points..


Re: Scores.. - XxerykxX - 30.08.2009

Can anybody help me??


Re: Scores.. - ettans - 30.08.2009

Then use SetPlayerScore(w,DriftPoints[playerid]);


Re: Scores.. - XxerykxX - 30.08.2009

But Do i have to change the letter w to something ??


Re: Scores.. - saiberfun - 30.08.2009

Quote:
Originally Posted by XxerykxX
But Do i have to change the letter w to something ??
no w = playerid, because
Quote:
Originally Posted by RSX
Код:
	for(new w;w<MAX_PLAYERS;w++)
	{
		SetPlayerScore(w,GetPlayerMoney(w));
	}
loops through all ids
it goes 1++,2++,3++,4++ until ur maxplayers are reached


Re: Scores.. - XxerykxX - 30.08.2009

OK but under what do i have to put it in??
Under the OnPlayerConnect or where??

EDIT:

I have like that :
Код:
//
public RefreshScore()
{
for(new w;w<MAX_PLAYERS;w++)
{
SetPlayerScore(w,DriftPoints[playerid]);
}
//------------------------------------------------------------------------------------------------------
i am getting these errors :
Код:
C:\Documents and Settings\Mariusz\Pulpit\Eryk\samp02Xserver.win32\gamemodes\pdd.pwn(137) : error 017: undefined symbol "DriftPoints"
C:\Documents and Settings\Mariusz\Pulpit\Eryk\samp02Xserver.win32\gamemodes\pdd.pwn(137) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Mariusz\Pulpit\Eryk\samp02Xserver.win32\gamemodes\pdd.pwn(137) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mariusz\Pulpit\Eryk\samp02Xserver.win32\gamemodes\pdd.pwn(137) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.