SA-MP Forums Archive
Score question - 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 question (/showthread.php?tid=188867)



Score question - AlexXx95 - 09.11.2010

Can someone help me with a script that increase player's score with 1 score point each hour?
Tanks!


Re: Score question - Larsey123IsMe - 09.11.2010

Look Here: http://forum.sa-mp.com/showthread.ph...ght=Score+evry


Re: Score question - AlexXx95 - 09.11.2010

tanks a lot xD


Re: Score question - Hiddos - 09.11.2010

Or if you couldn't get that one working due to error-ish code:

pawn Код:
public OnPlayerConnect(playerid)
{
  SetPVarInt(playerid, "scoreTimer", SetTimerEx("GivePlayerHourlyScore", 60 * 60 * 1000, 1, "i", playerid));
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  KillTimer(GetPVarInt(playerid, "scoreTimer"));
  return 1;
}

forward GivePlayerHourlyScore(playerid);
public GivePlayerHourlyScore(playerid)
{
  GivePlayerScore(playerid, GetPlayerScore(playerid) + 1);
}
Should work