Money on player first join? - 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: Money on player first join? (
/showthread.php?tid=423330)
Money on player first join? -
yooMx - 17.03.2013
So hello , how do I make it so players get 20000$ first time they join?
Re: Money on player first join? -
LarzI - 17.03.2013
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 );
}
Re: Money on player first join? - Patrick - 17.03.2013
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
Re: Money on player first join? -
yooMx - 17.03.2013
Any good register/login system?
Re: Money on player first join? -
Denying - 17.03.2013
This is a nice tutorial about how to make one.
https://sampforum.blast.hk/showthread.php?tid=273088
Re: Money on player first join? -
yooMx - 17.03.2013
Thank you all.