SA-MP Forums Archive
Players money won't save.[CLICK 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Players money won't save.[CLICK HERE] (/showthread.php?tid=244227)



Players money won't save.[CLICK HERE] - Azzy - 26.03.2011

Hey I got an issue, whatever amount a money a player has when he logs out and logs back in it always goes back to $7500 which is what they get when they first start off also the score, admin level and everything else saves and any money put in the bank stays the same.

What can be the issue?

Thanks in advance from the noob scripter.


Re: Players money won't save.[CLICK HERE] - Medal Of Honor team - 26.03.2011

show us the code so that we can fix it


Re: Players money won't save.[CLICK HERE] - Azzy - 26.03.2011

I didn't code it, I used one realsed from someone it's a base and I have know clue where it may be.


Re: Players money won't save.[CLICK HERE] - Serbish - 26.03.2011

How do you think we can help you if you don't give some informations about the code.


Re: Players money won't save.[CLICK HERE] - Medal Of Honor team - 26.03.2011

ok then show it


Re: Players money won't save.[CLICK HERE] - Azzy - 26.03.2011

I dunno whee it is in GM to copy and show you.
Any idea what the code would look like?

Sorry if I sound like a retard right now because I am....I'm like a new born baby...lol I fail at life.


Re: Players money won't save.[CLICK HERE] - Medal Of Honor team - 26.03.2011

OnPlayerConnect or OnPlayerDisconnect. See if there is any GetPlayerMoney


Re: Players money won't save.[CLICK HERE] - Azzy - 26.03.2011

public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return 1;

new string[128];
new pname[24];

=============================


public OnPlayerDisconnect(playerid, reason)
{
if(IsPlayerNPC(playerid))
{
IsSpawned[playerid] =0;
return 1;
}
if(afktag[playerid] == 1)
{
new pname[16];
GetPlayerName(playerid,pname,16);
strdel(pname, strlen(pname)-5, strlen(pname));
afktag[playerid] =0;
SetPlayerName(playerid,pname);
}
new string[128];
new pname[24];
GetPlayerName(playerid,pname,sizeof(pname));


Re: Players money won't save.[CLICK HERE] - Azzy - 26.03.2011

Does that help at all?


Re: Players money won't save.[CLICK HERE] - Serbish - 26.03.2011

Nothing will help like this.
You should learn the basics of scripting instead of copying and using finished gamemodes.