07.03.2016, 16:21
How can I create a save path for admins level as I have it in the enum pinfo but it's not saving it in the users file
dini_IntSet(file, "Level",PlayerInfo[playerid][pAdminLevel]);
public OnPlayerConnect(playerid) { gPlayerLogged[playerid] = 0; SetPlayerColor(playerid, COLOR_WHITE); TogglePlayerSpectating(playerid, true); new playername[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, playername, sizeof(playername)); format(file, sizeof(file), SERVER_USER_FILE, playername); SendClientMessage(playerid, COLOR_WHITE, "Welcome To Inter City Roleplay"); SendClientMessage(playerid, COLOR_BLUE, "Our Anti-Cheat will catch you, so do not try hacking"); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); if(fexist(file)) { PlayerInfo[playerid][pRegistered] = dini_Int(file, "Registered"); PlayerInfo[playerid][pMoney] = dini_Int(file, "Money"); PlayerInfo[playerid][pSkin] = dini_Int(file, "Skin"); PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "Level"); PlayerInfo[playerid][pJailTime] = dini_Int(file, "JailTime"); PlayerInfo[playerid][pHealth] = dini_Float(file, "Health"); PlayerInfo[playerid][pArmour] = dini_Float(file, "Armour"); PlayerInfo[playerid][pPhone] = dini_Int(file, "Phone"); PlayerInfo[playerid][pBank] = dini_Int(file, "Bank"); AdminDuty[playerid] = 0; SetTimerEx("TrashTimer", 1500000, 1, "i", playerid); JackingCar[playerid] = 0; Logging[playerid] = 0; GettingJob[playerid] = 0; Farming[playerid] = 0; PlantingSeeds[playerid] = 0; GrowingCrops[playerid] = 0; FarmingCrops[playerid] = -1; CollectingTrash[playerid] = 0; CollectingTrash1[playerid] = 0; CollectingTrash2[playerid] = 0; CollectingTrash3[playerid] = 0; CollectingTrash4[playerid] = 0; CollectingTrash5[playerid] = 0; CollectingTrash6[playerid] = 0; CollectingTrash7[playerid] = 0; CollectingTrash8[playerid] = 0; CollectingTrash9[playerid] = 0; CollectingTrash10[playerid] = 0; CollectingTrash11[playerid] = 0; CollectingTrash12[playerid] = 0; CollectingTrash13[playerid] = 0; oldcar[playerid] = 0; HandsupPlayer[playerid] = 0; EatingFood[playerid] = 0; DeliveryTruck[playerid] = 0; PlayerTied[playerid] = 0; ShotPlayer[playerid] = 0; SmuggleDropOff[playerid] = 0; PlayerCuffed[playerid] = 0; CellTime[playerid] = 0; PlayerRestrained[playerid] = 0; RentedCar[playerid] = 0; HoldingObject[playerid] = 0; PhoneOnline[playerid] = 0; Mobile[playerid] = INVALID_PLAYER_ID; Spectating[playerid] = 0; RingTone[playerid] = 0; CopDuty[playerid] = 0; TazerCharged[playerid] = 0; Tazer[playerid] = 0; SmugglingMats[playerid] = 0; SetPlayerColor(playerid, COLOR_WHITE); GettingPacks[playerid] = 0; ResetPlayerMoney(playerid); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Welcome Back", " Welcome Back, This Account Is Registered \n Please Type Your Password Below To Continue: \n", "Login", "Quit"); } else if (!dini_Exists(file)) { SendClientMessage(playerid, COLOR_BLUE, " [-Fort Carson Immigration-] "); SendClientMessage(playerid, COLOR_WHITE, " We Cannot Seem To Find A File "); SendClientMessage(playerid, COLOR_WHITE, " On You, Please Fill In This Information "); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Welcome To Fort Carson", " Welcome, This Account Is Not Registered \n Please Type Your Desired Password Below To Continue: \n", "Register", "Cancle"); AdminDuty[playerid] = 0; } return 1; }