SA-MP Forums Archive
How to give 1 point every minute? - 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: How to give 1 point every minute? (/showthread.php?tid=90232)



How to give 1 point every minute? - ThePS3Guy - 07.08.2009

I don't even know where to start on this one... Thanks in advance for your help.


Re: How to give 1 point every minute? - Antonio [G-RP] - 07.08.2009

1 point every minute? Explain more please


Re: How to give 1 point every minute? - Takumi.WS - 07.08.2009

1 Point = 1 Score you mean ?


Re: How to give 1 point every minute? - ThePS3Guy - 07.08.2009

Ya sorry, by point I meant score. I want to somehow make a script that gives the player one score every minute that they are playing on the server... is that possible?


Re: How to give 1 point every minute? - Takumi.WS - 07.08.2009

Yes, try to use a timer that will works



Re: How to give 1 point every minute? - clean180ollie - 07.08.2009

set it to every minute..

https://sampwiki.blast.hk/wiki/SetTimer



https://sampwiki.blast.hk/wiki/SetPlayerScore

and when its up replace..............

Код:
public message()
{
	print("1 second has passed.");
}
With..........

Код:
public message(playerid)
{
	SetPlayerScore(playerid, GetPlayerScore(playeridid) + 1);

}



Re: How to give 1 point every minute? - Antonio [G-RP] - 07.08.2009

pawn Код:
SetTimer("PlayerScore", 60000, 1);// this is the timer
And im thinking for the update...

pawn Код:
public DollahScoreUpdate()
{
new PlayerScore = GetPlayerScore(playerid, Float:score)
SetPlayerScore(playerid, score += 1)
return 1;
}
I don't know if this is correct, or how to put this together, but this is a start.


EDIT: Im a fail


Re: How to give 1 point every minute? - [GM]The_Don - 07.08.2009

How about this?

Put this Above main();
Код:
forward PointScoreUpdate(playerid);
Put this Somewere on in the Code:
Код:
public PointScoreUpdate(playerid)
{
new Score = GetPlayerScore(playerid);
SetPlayerScore(playerid,Score+1);
return 1;
}
This Under GamemodeInit
Код:
SetTimer("PointScoreUpdate",60000,1);
regards
[GM]The_Don