SA-MP Forums Archive
Money just once? - 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: Money just once? (/showthread.php?tid=112984)



Money just once? - Lajko1 - 11.12.2009

how i can make ''OnPlayerSpawn'' ''GivePlayerMoney(playerid,8000);'' but i want to make this just first time when player spawn, cuz atm i have if player spawn he get 8000 when he die adn spawn again he will get + 8000 ... how to make he get just first time 8000 when he come on server ?

ty for any help


Re: Money just once? - DeathOnaStick - 11.12.2009

Over Script.
pawn Код:
new bool:FirstSpawn[MAX_PLAYERS];
OnPlayerConnect
pawn Код:
FirstSpawn[playerid]=true;
OnPlayerSpawn
pawn Код:
if(FirstSpawn[playerid]==true)
{
GivePlayerMoney(playerid, 8000);
FirstSpawn[playerid]=false;
}
Here you go.

Btw.: Do you remember me?


Re: Money just once? - Lajko1 - 11.12.2009

yes i remember u , ty i will try


Re: Money just once? - Jeffry - 12.12.2009

Or make it like i did, put it under OnPlayerConnect. Then you get the money when you connect.