Score??
#1

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

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^^
Reply
#3

oh thx!!
Reply
#4

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


Try this
Код:
public OnPlayerConnect(playerid)
{
 SetTimer("", 60000,1);
 SetPlayerScore(playerid, GetPlayerScore(playerid)+1);

}
Reply
#6

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

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

Functions called from timers should be public
Reply
#9


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

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)