y_ini problem or am I doing something wrong
#1

Hello,

I am currently experiencing quite a large problem. It seems to happen both on the actual server and my localhost.

This is the code:

pawn Код:
CMD:setscore(playerid, params[])
{
    new playerb;
    if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_RED, "invalid id/name");
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_RED, "Permissions.");
    else
    {
    new score;
    if(sscanf(params, "ui", playerb, score)) return SendClientMessage(playerid, COLOR_RED, "syntax");
    SetPlayerScore(playerb, score);
    PlayerInfo[playerb][pScore] = score;
    }
    return 1;
}
What happens is, I /setscore myself, make a NEW account and the score is on that account too. This is seriously confusing.

Any ideas?

Here is the relevant code for connecting:

pawn Код:
public OnPlayerConnect(playerid)
{

    new score = PlayerInfo[playerid][pScore];
    SetPlayerScore(playerid, score);
The saving system I use is Y_INI. Any help would be appreciated.
Reply


Messages In This Thread
y_ini problem or am I doing something wrong - by PrivatioBoni - 19.02.2014, 18:21
Re: y_ini problem or am I doing something wrong - by Golimad - 19.02.2014, 21:48
Re: y_ini problem or am I doing something wrong - by PrivatioBoni - 21.02.2014, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)