Score?? - 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: Score?? (
/showthread.php?tid=92641)
Score?? -
MB@ - 21.08.2009
I want to make a script when i'm playing 1 minute on the server i get 1 score...How to do that 1minute=1score

Can u please help me..Thx!!
Re: Score?? -
saiberfun - 21.08.2009
set a timer for 1min aka 60000ms(the interval for the timer)
and do
SetPlayerScore(playerid,GetPlayerScore(playerid)++ );
or
SetPlayerScore(playerid,GetPlayerScore(playerid)+1 );
i dunno which one to use there^^
but one of em gotta be it^^
Re: Score?? -
MB@ - 21.08.2009
oh thx!!
Re: Score?? -
MB@ - 21.08.2009
I maked this
Код:
public OnPlayerConnect(playerid)
{
SetTimer("", 60000,10);
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
}
But it still wont work...
I dont hawe any erors or warnings but when i play i dont get any score
Re: Score?? -
pliva_sb - 21.08.2009
Try this
Код:
public OnPlayerConnect(playerid)
{
SetTimer("", 60000,1);
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
}
Re: Score?? -
gtalover12 - 21.08.2009
Set a timer under on player connect..
I.E
Код:
//above publics
forward ScoreUpdate(playerid);
OnPlayerConnect(playerid)
{
SetTimerEx("ScoreUpdate",60000,1,"i",playerid);
return 1;
}
//Under publics
ScoreUpdate(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
return 1;
}
Should work...
Re: Score?? -
MB@ - 21.08.2009
Nope it wont work
And i still get warning
Код:
C:\Documents and Settings\Administrator\Desktop\Stunt-server\gamemodes\StuntWorld.pwn(701) : warning 203: symbol is never used: "ScoreUpdate"
I tryed everything but when i play the game i hawe score 0 and after 1 minute it's still 0
Re: Score?? -
kaisersouse - 21.08.2009
Functions called from timers should be public
Re: Score?? -
MB@ - 21.08.2009
Now i get this eror
Код:
C:\Documents and Settings\Administrator\Desktop\Stunt-server\gamemodes\StuntWorld.pwn(683) : warning 235: public function lacks forward declaration (symbol "ScoreUpdate")
I realy need this for my server! So please help
Re: Score?? -
kaisersouse - 21.08.2009
you'll get more help if you pay attention to what people are telling you. Maybe search around a bit too.
above ScoreUpdate function put
Код:
forward ScoreUpdate(playerid);