Loading problem (+rep)
#1

Again, I need some help from the community.
I'm going to give an example for my bug :
When an admin connects, he logs fine but when players connects after him, they get the same stats for the admin (job, level, admin level) and all this things, the bug is coming from INI_ParseFile, I'm sure.

Here's the code
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME], string[268];
    TogglePlayerSpectating(playerid, true);
    GetPlayerName(playerid, name, sizeof(name));
    SetSpawnInfo(playerid, pInfo[playerid][SkinID], 299, 1740.6188, -1949.9669, 14.1172, 176.0951, 0, 0, 0, 0, 0, 0);
    SetPlayerSkillLevel(playerid, 0, 5);
    INI_ParseFile(Path(playerid), "loadaccount_%s", .bExtra = true, .extra = playerid);
    if(!IsRPName(name, 1))
    {
        SendClientMessage(playerid, 0xDE5454FF, "Ce nom n'est pas RP. Veuillez vous reconnecter en utilisant un nom RP.");
        SendClientMessage(playerid, 0xDE5454FF, "Essayez de choisir un nom rйaliste et utilisable dans la vie rйel. Ex: Will Smith");
        SetTimerEx("DelayedKick", 450, false, "i", playerid);

        return false;
    }
    if(pInfo[playerid][Banned] == 1)
    {
       format(string, sizeof(string), "Vous кtes banni dйfinitivement du serveur par l'administrateur %s", pInfo[playerid][AdminBan]);
       SendClientMessage(playerid, -1, string);
       format(string, sizeof(string), "La raison de votre bannisement est: %s", pInfo[playerid][BanRaison]);
       SendClientMessage(playerid, -1, string);
       format(string, sizeof(string), "Vous pouvez postuler une demande d'unban sur playtheroleplay.forumactif.com.");
       SendClientMessage(playerid, -1, string);
       SetTimerEx("Kicka", 450, false, "i", playerid);
    }
    if(fexist(Path(playerid)))
    {
       ShowPlayerDialog(playerid, dialog_Login, DIALOG_STYLE_PASSWORD, "Identification", "Tapez votre mot de passe pour se connecter.", "Connexion", "Quitter");
       PlayerPlaySound(playerid,1185,0.0,0.0,0.0);
    }

    else if(!fexist(Path(playerid)))
    {
        ShowPlayerDialog(playerid, dialog_Register, DIALOG_STYLE_INPUT, "Identification", "Tapez votre mot de passe pour s'enregistrer.", "Enregistrer", "Quitter");
        PlayerPlaySound(playerid,1185,0.0,0.0,0.0);
        //TextDrawShowForPlayer(playerid, Tuto1);*
    }

    return true;
}
I'm going to give a rep for the person who helped me.
Reply


Messages In This Thread
Loading problem (+rep) - by streetpeace - 23.09.2014, 12:30
Re: Loading problem (+rep) - by iSkate - 23.09.2014, 16:03
Re: Loading problem (+rep) - by XStormiest - 23.09.2014, 16:47
Re: Loading problem (+rep) - by DTV - 25.09.2014, 02:35
Re: Loading problem (+rep) - by The__ - 25.09.2014, 03:30
Re: Loading problem (+rep) - by TakeiT - 25.09.2014, 04:14
Re : Loading problem (+rep) - by streetpeace - 25.09.2014, 09:54

Forum Jump:


Users browsing this thread: 1 Guest(s)