Posts: 632
Threads: 24
Joined: Aug 2011
Uhmmm hello.. I've started a server recently and now I'm having some problems, and that is that some players just get my stats, so I was wondering if any of you had that before, if so please tell me what's the problem, passwords are hashed and if you need any part of my script, say it.
Posts: 3,715
Threads: 358
Joined: Apr 2012
Reputation:
0
What Admin System you're using?
Posts: 241
Threads: 5
Joined: Jul 2012
Reputation:
0
Are you using MySQL?
If so, did you sanitize data in onplayerconnect?
Posts: 355
Threads: 25
Joined: May 2012
Reputation:
0
If you use variables like:
pPassword, pUsername, pCash.
You must RESET all the variables on either OnPlayerConnect, or OnPlayerDisconnect (I suggest you do it under OnPlayerConnect)
E.G.
public OnPlayerConnect(playerid)
{
pCash[playerid] = 0;
pAdminLevel[playerid] = 0;
}
Posts: 632
Threads: 24
Joined: Aug 2011
Quote:
Originally Posted by Romel
What Admin System you're using?
|
I'm using my own samp system
About the MySql no
And Pizzy I got that one already
Posts: 632
Threads: 24
Joined: Aug 2011
19.01.2013, 07:45
(
Последний раз редактировалось Blast3r; 19.01.2013 в 10:12.
)
Quote:
Originally Posted by Michael@Belgium
Reset the variables also when the player leaves (OnPlayerDisconnect()) - After the player stats get saved.
|
Код:
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVip]);
INI_WriteInt(File,"Warns",PlayerInfo[playerid][pWarn]);
INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
INI_Close(File);
KillStreak[playerid] = 0;
return 1;
}
Already done :/
EDIT: I fixed it, thx a lot for your help