SA-MP Forums Archive
please help me with onplayerspawn - 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: please help me with onplayerspawn (/showthread.php?tid=127834)



please help me with onplayerspawn - Keeboo13 - 15.02.2010

how do i make my script from scratch so player spawn with the ammount of money 10000 because players spawn with 0


Re: please help me with onplayerspawn - mansonh - 15.02.2010

Go into pawno and do file>new.
It will give you a basic layout for your script. (this is filterscript, if you want a gamemode then thats a little different).

make sure to change
//#define FILTERSCRIPT
to
#define FILTERSCRIPT

Then under OnPlayerSpawn
Код:
public OnPlayerSpawn(playerid)
{
    GivePlayerMoney(playerid, 10000);
	return 1;
}
It sounds like your new to pawno so you will need to:
http://forum.sa-mp.com/index.php?topic=2750.0
http://forum.sa-mp.com/index.php?topic=139.0
https://sampwiki.blast.hk/wiki/Main_Page



Re: please help me with onplayerspawn - Keeboo13 - 15.02.2010

i got it now so how do i make it save playermoney


Re: please help me with onplayerspawn - bajskorv123 - 15.02.2010

That gives them 10000 evry time they spawn.
If they only should spawn with 10000, put this:
pawn Код:
public OnPlayerSpawn(playerid)
{
  ResetPlayerMoney(playerid);
  GivePlayerMoney(playerid, 10000);
  return 1;
}



Re: please help me with onplayerspawn - [gmR]BarMaN - 15.02.2010

To save things, you should use a File Engine or Databases.
Look at the one of the tutorials in the SAMP forum.


Re: please help me with onplayerspawn - Keeboo13 - 15.02.2010

can u give me a link


Re: please help me with onplayerspawn - mansonh - 15.02.2010

http://forum.sa-mp.com/index.php?action=search
same way we all find tutorials.


Re: please help me with onplayerspawn - Keeboo13 - 15.02.2010

one more thing how do i add login system if i dont wanna use filterscript


Re: please help me with onplayerspawn - mansonh - 15.02.2010

You mean you don't want to use someone elses filterscript?
Well you have to code one.

You would need to have player data that saves, dini etc
Then onplayerconnect show then a dialog or whatever and set a variable to login etc.

I would look at one that already exists to see how its done.


Re: please help me with onplayerspawn - Lorenc_ - 15.02.2010

Make your own its simple just go on wiki and follow instructions!

Are you a scripting begginer.
http://forum.sa-mp.com/index.php?topic=2750.0