Not saving on Host provider (y_ini)
#1

Ok lemme explain the absulutely weird stuff that i faced out, with my paid sa-mp hosting took it from there https://www.elites-host.com , doesn't save anything, i mean when i connect to the server and register the account and then i log off, and viewing the Users folder, i click on the player's config folder, and it's empty. Some screens:

On Local Host: https://i.imgur.com/J4V2ijx.png

On Hosting: https://i.imgur.com/afD15bw.png


Weid stuff is that, it asks for the password and somehow it loads the config player, but i cant edit them on the player's folder. While on local host i can edit stuffs.
Screens on hosted were taken from FTP, even trought the control panel files are still empty: https://i.imgur.com/OMDo09Y.png

EDIT: Nothing is being saved even the password, i guess its somehow related to that Users folder and the hosting provider is not writing anything to that folder.
Reply
#2

You could at least show us some codes for us to do something about. There might be something wrong in your codes

you should also provide us with what os your hosting uses. Like for example Linux or Windows since both have different way of running the samp server
Reply
#3

Check your directory permissions.
Reply
#4

Quote:
Originally Posted by JesterlJoker
Посмотреть сообщение
You could at least show us some codes for us to do something about. There might be something wrong in your codes

you should also provide us with what os your hosting uses. Like for example Linux or Windows since both have different way of running the samp server
Code was checked multiple times without any success of fixing, but i will post it once again

On Player Connect

Код:
    new name1[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name1,sizeof(name1));
    if(fexist(Path(playerid)))
    {
        INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"{4286f4}Account Login","Welcome back to {EFB509}Los Santos DeathMatch Battlefield\n\n{4286f4}This account is registered\n{4286f4}Please insert your password below in order to login!","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"{4286f4}Account Registration","Welcome to {EFB509}Los Santos DeathMatch Battlefield\n\n{4286f4}This account is not registered!\n{4286f4}Please insert your apssword below in order to create an account and play!","Register","Quit");
        return 1;
    }
On Player Disconnect

Код:
  if(fexist(Path(playerid)))//Will check if the file is exit or not inside of User's folder that we have created.
    {
        new INI:file = INI_Open(Path(playerid)); //will open their file
        INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
        INI_WriteInt(file,"Admin", pInfo[playerid][Admin]); //If you've set his/her admin level, then his/her admin level will be saved inside of his/her account
        INI_WriteInt(file,"Score",GetPlayerScore(playerid));
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
        INI_WriteInt(file,"Points",pInfo[playerid][Points]);
		pInfo[playerid][Score] = GetPlayerScore(playerid);
        INI_Close(file);
        return 1;
    }
On Dialog Response

Код:
    if(dialogid == dregister)
    {//then
        if(!response) {
        SendClientMessage(playerid, -1 , "{FF0000}(INFO) You have been kicked for not logging in!");
        SetTimerEx("OnPlayerKicked", 100, false, "i", playerid);
        }
        if(response) //if they clicked the first button "Register"
        {//then
            if(!strlen(inputtext)) //If they didn't enter any password
            {// then they are kicked
				SendClientMessage(playerid, -1 , "{FF0000}(INFO) You didn't entered any password, for security purposes you must relog !");
               	SetTimerEx("OnPlayerKicked", 100, false, "i", playerid);
                return 1;
            }
            new hashpass[129];
            WP_Hash(hashpass,sizeof(hashpass),inputtext);
            new INI:file = INI_Open(Path(playerid));
            INI_SetTag(file,"Player's Data");
            INI_WriteString(file,"Password",hashpass);
            INI_WriteInt(file,"Admin",0);
            INI_WriteInt(file,"Score",0);
            INI_WriteInt(file,"Kills",0);
            INI_WriteInt(file,"Deaths",0);
            INI_WriteInt(file,"Points",0);
            INI_Close(file);
            SendClientMessage(playerid,-1,"{EFB509}(INFO) You have successfully created an account! You can start playing now, If you need help use /commands, /rules, /ask");
			TogglePlayerSpectating(playerid, 0);
			return 1;
        }
    }
    if(dialogid == dlogin)
    {//then
        if(!response){
        SendClientMessage(playerid, -1 , "{FF0000}(INFO) You have been kicked for not logging in !");
        SetTimerEx("OnPlayerKicked", 100, false, "i", playerid);
		}
        if(response)
        {//then
            new hashpass[129];
            WP_Hash(hashpass,sizeof(hashpass),inputtext);
            if(!strcmp(hashpass,pInfo[playerid][Pass]))
            {//then
                INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
                SetPlayerScore(playerid,pInfo[playerid][Score]);
                SendClientMessage(playerid,-1,"{c3c3c3}(INFO) You have successfully logged in! You can start playing now.");
                TogglePlayerSpectating(playerid, 0);
            }
            else
            {//then
				SendClientMessage(playerid, -1 , "{FF0000}(INFO) You didn't entered any password or you entered wrong password, for security purposes you must relog ! ");
                SetTimerEx("OnPlayerKicked", 100, false, "i", playerid);
				return 1;
            }
        }
    }
Hosting is windows, since the plugins loaded are .dll and not .so

Directory permissions 777 on the Users Folder.
Reply
#5

EDIT: noticed, that it doesnt even save the password on hosting provider.. (nothing is saved). So something is making trouble on writing to Users folder..
Reply
#6

It saves the player name on users folder, but i can login in whatever password i put, like 123 instead of the password i choosed, and yeah on local host it never happened damn.
Reply
#7

Solved, tried on another hosting provider worked, just this one is the problem
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)