ladmin doesn't load score and money on connect
#1

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.
Reply
#2

Do you have the ladmin scriptfiles in the correct folder?
Reply
#3

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

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

Hmm, anyone? D:
Reply
#6

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
Reply
#7

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.
Reply
#8

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
Reply
#9

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.
Reply
#10

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:
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)