Money on player first join?
#1

So hello , how do I make it so players get 20000$ first time they join?
Reply
#2

If you have an account system (register and login) just use GivePlayerMoney on register.

If a problem occurs (like that you can't give money before spawn) simply add a global bool and use that to check for first-time-login:

pawn Код:
//global
new
    bool:g_bFirstLogin[ MAX_PLAYERS ]
;

//on register
g_bFirstLogin[ playerid ] = true;

//on spawn
if( g_bFirstLogin[ playerid ] )
{
    GivePlayerMoney( playerid, 20000 );
}
Reply
#3

do you have register system when player register? you can put it there example

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_REGISTER)
    {
        if(!response) return Kick(playerid);
        if(response)
        {
            //your register code here
            GivePlayerMoney(playerid, 20000);//give's player money for first connect on server
        }
    }
    return 1;
}
or you can use variable you still need a register/login system
Reply
#4

Any good register/login system?
Reply
#5

This is a nice tutorial about how to make one.
https://sampforum.blast.hk/showthread.php?tid=273088
Reply
#6

Thank you all.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)