Loading
#1

Can anyone see why this isn't saving or loading the stats properly? Is saves skin and player registered but not the money or playeradmin level or last location
Reply
#2

how can we see why if there's no code to check?
Reply
#3

Код:
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;
}
Reply
#4

Why "ResetPlayerMoney" ?
Why not SetPlayerMoney? You need to use this function after intialized your var
Reply
#5

Now i have errors undefined symbol "SetPlayerMoney" how do i fix that?
Reply
#6

Try GivePlayerMoney
Reply
#7

Will try it in the morning but in the meanwhile that will only solve the money saving issues and not the adminlevel one
Reply
#8

Quote:
Originally Posted by CSLangdale
Посмотреть сообщение
Will try it in the morning but in the meanwhile that will only solve the money saving issues and not the adminlevel one
You should hire a scripter, or find the person who scripted what you have.

After all, the mode itself should be saving, that is, if it was working in the first place...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)