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



scoreupdate - 02manchestera - 06.03.2010

Im trying to ge the score to show how many kills they have done this is what i tried and what errors i got

Код:
public ScoreUpdate() {
	foreachEx(i) {
		SetPlayerScore(i,PlayerInfo[playerid][Kills](i));
	}
	return 1;
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\my server\filterscripts\gAdmin.pwn(3390) : error 017: undefined symbol "playerid"
C:\Program Files\Rockstar Games\GTA San Andreas\my server\filterscripts\gAdmin.pwn(3390) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\my server\filterscripts\gAdmin.pwn(3390) : error 001: expected token: ";", but found ")"
C:\Program Files\Rockstar Games\GTA San Andreas\my server\filterscripts\gAdmin.pwn(3390) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\my server\filterscripts\gAdmin.pwn(3390) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: scoreupdate - Jefff - 06.03.2010

Код:
	foreachEx(i) {
		SetPlayerScore(i,PlayerInfo[i][Kills]);
	}



Re: scoreupdate - 02manchestera - 06.03.2010

Didnt work just shows player id as score


Re: scoreupdate - Calgon - 06.03.2010

Why don't you just ++ to the kills (then SetPlayerScore) when OnPlayerDeath is executed, that would seem to be the logical way.