Vortex Roleplay help
#3

if your trying to load the admin value thats not the way
you will need to perse the file then load it like this
pawn Код:
public GetPlayerAVSAdmin(playerid)
{
      new name[MAX_PLAYER_NAME],file[80];GetPlayerName(playerid, name, sizeof(name));
      format(file,sizeof(file),"/%s.txt",name);//File location
      if(fexist(file))
      {
            INI_ParseFile(file, "PerseAdminLevel", false, true, playerid, true, false);
            PlayerInfo[playerid][pAdmin] = GetPVarInt(playerid, "Admin");//what ever you save it as in the file i used here "Admin"
      }
}

//put this anywhere OUTSIDE a callback
forward PerseAdminLevel(playerid, name[], value[]);
public PerseAdminLevel(playerid, name[], value[])
{
if(!strcmp(name,"Admin"))SetPVarString(playerid,"Admin", value);
}
and when you want to load the player level just use GetPlayerAVSAdmin(playerid);
Reply


Messages In This Thread
Vortex Roleplay help - by Smally - 13.11.2011, 19:59
Re: Vortex Roleplay help - by Smally - 14.11.2011, 17:48
Re: Vortex Roleplay help - by park4bmx - 15.11.2011, 17:25

Forum Jump:


Users browsing this thread: 1 Guest(s)