SA-MP Forums Archive
Giving score on player connect. And money/score every 3 minutes - 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)
+--- Thread: Giving score on player connect. And money/score every 3 minutes (/showthread.php?tid=458816)



Giving score on player connect. And money/score every 3 minutes - Ponii - 18.08.2013

Giving score/money on player connect. And money/score every 3 minutes

I want to give player money/scores when they join the first time (When they finish register, they receive them, not everytime they login, it will be abused). And giving them money/scores every 3 minutes or so. Thanks!


Re: Giving score on player connect. And money/score every 3 minutes - zaider - 18.08.2013

https://sampwiki.blast.hk/wiki/SetPlayerScore - For setting player score when they register. Should apply where the player is told he successfully registered.
https://sampwiki.blast.hk/wiki/SetTimer - for your score every 3 minutes
https://sampforum.blast.hk/showthread.php?tid=133801 - for a lesson in SetTimer


Re: Giving score on player connect. And money/score every 3 minutes - Vanter - 18.08.2013

pawn Code:
//OnPlayerConnect
SetPlayerScore(playerid, GetPlayerScore(playerid) +1);

//OnGameModeInIt
    SetTimer("ScoreGiver",180000,1);

//timer
forward ScoreGiver(playerid);
public ScoreGiver(playerid)
{
    SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
    GivePlayerMoney(playerid, 5000);
    return 1;
}