SA-MP Forums Archive
Just a little help here. - 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: Just a little help here. (/showthread.php?tid=481464)



Just a little help here. - DeathFire - 15.12.2013

Hi!
I forgot on how to do it so, when a player connects, the server gives him 100 score, but only one time, i don't want it to constantly give 100 score everytime the player joins
thanks!


Re: Just a little help here. - Patrick - 15.12.2013

Quote:
Originally Posted by DeathFire
Посмотреть сообщение
Hi!
I forgot on how to do it so, when a player connects, the server gives him 100 score, but only one time, i don't want it to constantly give 100 score everytime the player joins
thanks!
Do you have your own register/saving system? if you do put this in register dialog

pawn Код:
SetPlayerScore(playerid, 100);



Re: Just a little help here. - DeathFire - 18.12.2013

yeh i do


Re: Just a little help here. - ReD_HunTeR - 18.12.2013

Код:
#include <a_samp>

new refundcheck[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    if(refundcheck[playerid] >= 0)
    {
      SetPlayerScore(playerid, 100);
      refundcheck[playerid] = 1;
    }
    else if(refundcheck[playerid] >=1) return 0;
    return 1;
}