SA-MP Forums Archive
ladmin doesn't load score and money on connect - 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: ladmin doesn't load score and money on connect (/showthread.php?tid=256551)



ladmin doesn't load score and money on connect - Julian12345 - 21.05.2011

Hello, I've a problem with ladmin.

If players are logging in, the score/money dont load, although its saved in the user file.

Here's the important part:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(PlayerInfo[playerid][LoggedIn] == 1) SavePlayer(playerid);
}
pawn Код:
SavePlayer(playerid)
{
    dUserSetINT(PlayerName2(playerid)).("money",GetPlayerMoney(playerid));
    dUserSetINT(PlayerName2(playerid)).("score",GetPlayerScore(playerid));
}
pawn Код:
LoginPlayer(playerid)
{
    {ResetPlayerMoney(playerid); GivePlayerMoney(playerid, dUserINT(PlayerName2(playerid)).("money") ); }
    SetPlayerScore(playerid, dUserINT(PlayerName2(playerid)).("score") );
}
And yes, the cash/money save when player disconnects.


Re: ladmin doesn't load score and money on connect - Jay. - 21.05.2011

Do you have the ladmin scriptfiles in the correct folder?


AW: Re: ladmin doesn't load score and money on connect - Julian12345 - 21.05.2011

Quote:
Originally Posted by Funtime
Посмотреть сообщение
Do you have the ladmin scriptfiles in the correct folder?
Yes I have.


Re: AW: Re: ladmin doesn't load score and money on connect - Jay. - 21.05.2011

Quote:
Originally Posted by Julian12345
Посмотреть сообщение
Yes I have.
sorry i don't know


AW: ladmin doesn't load score and money on connect - Julian12345 - 21.05.2011

Hmm, anyone? D:


Re: ladmin doesn't load score and money on connect - xalith - 21.05.2011

im guessing you have something interfering with ladmin, such as your gm, make sure you dont have a setplayermoney or setplayerscore under OnPlayerSpawn in any of your gm's of fs's
hope this helped


AW: Re: ladmin doesn't load score and money on connect - Julian12345 - 21.05.2011

Quote:
Originally Posted by xalith
Посмотреть сообщение
im guessing you have something interfering with ladmin, such as your gm, make sure you dont have a setplayermoney or setplayerscore under OnPlayerSpawn in any of your gm's of fs's
hope this helped
Hmm, maybe it's the IRC system, but I checked the GM and the FS's, and there's no setplayermoney / score.


Re: ladmin doesn't load score and money on connect - Shurik01 - 21.05.2011

I have a line looks like this

if(ServerInfo[GiveMoney] == 1) {ResetPlayerMoneyEx(playerid); GivePlayerMoneyEx(playerid, dUserINT(PlayerName2(playerid)).("money") ); }

scriptfiles\ladmin\config

check the contents of the file
Config.ini
MaxPing=200
ReadPMs=1
ReadCmds=1
MaxAdminLevel=10
AdminOnlySkins=0
AdminSkin=217
AdminSkin2=214
AntiBot=1
AntiSpam=1
AntiSwear=1
NameKick=1
PartNameKick=1
NoCaps=0
Locked=0
SaveWeap=1
SaveMoney=1
ConnectMessages=1
AdminCmdMessages=1
AutoLogin=0
MaxMuteWarnings=4
MustLogin=1
MustRegister=1
SaveScore=1

sorry for bad english


Re: ladmin doesn't load score and money on connect - xalith - 21.05.2011

Quote:
Originally Posted by Shurik01
Посмотреть сообщение
I have a line looks like this

if(ServerInfo[GiveMoney] == 1) {ResetPlayerMoneyEx(playerid); GivePlayerMoneyEx(playerid, dUserINT(PlayerName2(playerid)).("money") ); }
hmm try marking that line ot of the script,
pawn Код:
e.g use /*f(ServerInfo[GiveMoney] == 1) {ResetPlayerMoneyEx(playerid); GivePlayerMoneyEx(playerid, dUserINT(PlayerName2(playerid)).("money") ); } */
when you compile you will get a warning possibly a "symbol is never used", ignore it and test script, then let me know what happens.


AW: Re: ladmin doesn't load score and money on connect - Julian12345 - 21.05.2011

Quote:
Originally Posted by Shurik01
Посмотреть сообщение
I have a line looks like this

if(ServerInfo[GiveMoney] == 1) {ResetPlayerMoneyEx(playerid); GivePlayerMoneyEx(playerid, dUserINT(PlayerName2(playerid)).("money") ); }

scriptfiles\ladmin\config

check the contents of the file
Config.ini
MaxPing=200
ReadPMs=1
ReadCmds=1
MaxAdminLevel=10
AdminOnlySkins=0
AdminSkin=217
AdminSkin2=214
AntiBot=1
AntiSpam=1
AntiSwear=1
NameKick=1
PartNameKick=1
NoCaps=0
Locked=0
SaveWeap=1
SaveMoney=1
ConnectMessages=1
AdminCmdMessages=1
AutoLogin=0
MaxMuteWarnings=4
MustLogin=1
MustRegister=1
SaveScore=1

sorry for bad english
I have that.

Quote:
Originally Posted by xalith
Посмотреть сообщение
hmm try marking that line ot of the script,
pawn Код:
e.g use /*f(ServerInfo[GiveMoney] == 1) {ResetPlayerMoneyEx(playerid); GivePlayerMoneyEx(playerid, dUserINT(PlayerName2(playerid)).("money") ); } */
when you compile you will get a warning possibly a "symbol is never used", ignore it and test script, then let me know what happens.
I got no warning, but now my money is 0, before I could see my money in the /stats D: