Help! Serious condition!
#1

OnPlayerRequestSpawn:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new string[250];
if(gPlayerLogged[playerid] != 1)
    {
        SendClientMessage(playerid,COLOR_WHITE, "Please Login Before Spawning");
        return 0;
    }
    else
    {
    SpawnPlayer(playerid);
    if(dini_Exists(PlayerPath(playerid)))
    {
    LoadPlayerOrgInfo(playerid);
    }
    else if(!dini_Exists(PlayerPath(playerid)))
    {
    dini_Create(PlayerPath(playerid));
    }
    format(string,sizeof(string),"Organization: {FFFFFF}%s",GetOrgName(PlayerOrg[playerid]));
    SendClientMessage(playerid, COLOR_SAMP, string);
    }
    return 1;
}
stock LoadPlayerOrgInfo:
pawn Код:
stock LoadPlayerOrgInfo(playerid)
{
    new string[45];
    format(string,sizeof(string),"%s",dini_Get(PlayerPath(playerid),"Org"));
    PlayerOrg[playerid] = GetOrgID(string);
    new string2[28];
    PlayerMember[playerid] = dini_Int(PlayerPath(playerid),"Member");
    PlayerADV[playerid] = dini_Int(PlayerPath(playerid),"adv");
    PlayerCo[playerid] = dini_Int(PlayerPath(playerid),"co");
    PlayerLeader[playerid] = dini_Int(PlayerPath(playerid),"Leader");
    PlayerTrial[playerid] = dini_Int(PlayerPath(playerid),"Trial");
    CollectedWage[playerid] = dini_Int(PlayerPath(playerid), "CollectedWage");

    if (strcmp(Organization[PlayerOrg[playerid]][Leader], PlayerName(playerid),true) == 0 && PlayerOrg[playerid] != 0)
{
        PlayerLeader[playerid] = 1;
        }
        return 1;
}

No Errors.
But a bug:
The saving org info stock is correct. It saves the information.and PlayerPath stock is also correct. It creates the dini and saves the information. but the LoadPlayerOrgInfo does not works. I don't why?
It doesnt loads the player org info.I've tried the above function of loading player org info at OnPlayerConnect still that bug and have tried also on login dialog and onplayerspawn also. but no errors but the bug causes. Please help with it!
Reply
#2

bump! as no one replied
Reply
#3

bump! no one replied
Reply
#4

bump
Reply
#5

fucking bump again!
Reply
#6

Stop fucking bumping!

Check this http://forum.sa-mp.com/announcement.php?f=12
Reply
#7

THEN HELP ME WITH THIS!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)