Problem With Loading File From DINI
#1

Hello Guys Im Making Team Saving System It Can Write Files But When Player Get In Server it's Not Set Player To Team And Not Spawn & Im Using gTeam Too When Player Spawn Its SetPlayer to that team
Examples:
Team 1 SetPlayerTeam = 0
Team 2 SetPlayerTeam = 1

This is My Pawn Code
pawn Код:
public OnPlayerConnect(playerid)
{
        new file[128], pname[MAX_PLAYER_NAME];
    if(dini_Exists(file))

    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), "\\Users\\%s.ini", pname);
        SetPlayerTeam(playerid, dini_Int(file, "team"));
        if(GetPlayerTeam(playerid) == 1 && 0)
       {
       SpawnPlayer(playerid);
       }
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    {
    new file[128], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), "\\Users\\%s.ini", pname);
    dini_Create(file);
    dini_IntSet(file, "team", GetPlayerTeam(playerid));
   
    }
    return 1;
}
Thank You For Help ^_^

And ONe More Problem
Im Using MTA Mapping Server Im mapping at LAS Venturas
And Little Map At Los santos But At Los Santos Object is not load can someone fix this ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)