how can i create a score timer - 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 can i create a score timer (
/showthread.php?tid=246185)
how can i create a score timer -
jejemonerz123 - 03.04.2011
how can i make a score timer if you are in the server for 1 min every 1minute 3 score ?
Re: how can i create a score timer -
mprofitt - 03.04.2011
Quote:
Originally Posted by jejemonerz123
how can i make a score timer if you are in the server for 1 min every 1minute 3 score ?
|
Search for SetTimerEx in the wiki.
What you are asking is very basic. If you do not know enough to even attempt it on your own, you better practice and educate yourself about pawn scripting a little more first. You are not going to learn anything by asking others to write your script for you.
If you want to learn, at least put your idea into a script and ask others for input.
Re: how can i create a score timer -
omer5198 - 03.04.2011
in this public:
pawn Код:
OnPlayerConnect(playerid)
write this:
pawn Код:
SetTimer("Score_Timer", 60000, true);
below your "new ...." and defines + includes and all this... write:
pawn Код:
forward Score_Timer(playerid);
now... copy this
not in any other public:
pawn Код:
public Score_Timer(playerid)
{
new playerscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, playerscore+=3);
return 1;
}
Re: how can i create a score timer -
HyperZ - 03.04.2011
OnPlayerConnect:
pawn Код:
SetTimerEx("score", 5000, true, "i", playerid);
Somewhere in your script:
pawn Код:
forward score(playerid);
public score(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
}
Re: how can i create a score timer -
playbox12 - 03.04.2011
pawn Код:
public OnPlayerConnect(playerid)
{
SetTimerEx("Score", 60000, true, "i", playerid);
return 1;
}
forward Score(playerid);
public Score(playerid) { SetPlayerScore(playerid, GetPlayerScore(playerid)+3); }
Oh, Clive was faster.
Re: how can i create a score timer -
mprofitt - 03.04.2011
Why do you guys feed those who post in the wrong section. He is requesting someone write his script for him. This belongs in script request. This section is for those who at at least attempt to write a script and are requesting input.