Im a new serverffs user and...
#1

I am having a few problems, i have a registration system that i made by hand, it works perfectly on my home test server. As soon as i try it on my public server on ffs. It does not work perfect, it is all screwy. Is there any way to fix this problem? Its with the script not being able to call the register dialog response. Yet again, it works perfect on my local test server.

Callback:

pawn Код:
if(!fexist(file))
    {
        for(new go;go<11;go++)
        {
        SendClientMessage(playerid,-1," ");
        }
        SendClientMessage(playerid,-1,"{FFFFFF}[SYSTEM]{D1D1D1} You are not registered, please register now.");
        ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Registration","--------------------\nWelcome to RealTime Roleplay\nPlease register your account.\n--------------------","Register","");
        return 1;
    }
    if(fexist(file))
    {
        for(new go;go<11;go++)
        {
        SendClientMessage(playerid,-1," ");
        }
        SendClientMessage(playerid,-1,"{FFFFFF}[SYSTEM]{D1D1D1} Welcome back to RealTime Roleplay!");
        SendClientMessage(playerid,-1,"{D1D1D1}Please login to continue your roleplay expirence.");
        ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"Login","--------------------\nWelcome back to RealTime Roleplay!\nPlease type in your password and hit login.\nHope you have fun on RealTime Roleplay\n--------------------","Login","");
        SetPlayerSkin(playerid,Info[playerid] [Skin]);
        return 1;
    }



DialogResponse

pawn Код:
new file[128],name[128],buf[129],kicked[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(file,sizeof(file),userfile,name);
    format(kicked,sizeof(kicked),"{FF6803}%s has been kicked [Reason: Failure to provide a correct password]",name);
    WP_Hash(buf,sizeof(buf),inputtext);
    if(dialogid == 3)
    {
        if(response)
        {
            dini_Create(file);
            dini_Set(file,"Password",buf);
            dini_IntSet(file,"Level",0);
            dini_IntSet(file,"Score",1);
            dini_IntSet(file,"Cash",1000);
            dini_IntSet(file,"Jailed",0);
            dini_IntSet(file,"JTime",0);
            dini_IntSet(file,"Vehicle",0);
            Info[playerid] [Password] = dini_Int(file,"Password");
            Info[playerid] [Level] = dini_Int(file,"Level");
            Info[playerid] [Score] = dini_Int(file,"Score");
            Info[playerid] [Cash] = dini_Int(file,"Cash");
            Info[playerid] [Jailed] = dini_Int(file,"Jailed");
            Info[playerid] [JTime] = dini_Int(file,"JTime");
            SetPlayerScore(playerid,Info[playerid] [Score]);
            GivePlayerMoney(playerid,Info[playerid] [Cash]);
            SendClientMessage(playerid,-1,"{FFFFFF}[SYSTEM]{D1D1D1} You have successfully registered!");
            ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"Select your gender","Male\nFemale","Ok","");
        }
        else
        {
            ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Registration","Welcome,please register your name\nThe password entered will be used to login to the server.","Register","");
        }
        return 1;
    }
    if(dialogid == 4)
    {
        new warn[128];
        format(warn,sizeof(warn),"{D40404}[WARNING]{D1D1D1} You have typed in the wrong password, try %i/3",IsWarned[playerid]);
        if(response)
        {
            if(strcmp(buf,dini_Get(file,"Password"))==0)
            {
                SendClientMessage(playerid,-1,"{FFFFFF}[SYSTEM]{D1D1D1} Welcome back, You have successfuly logged in!");
                Info[playerid] [Level] = dini_Int(file,"Level");
                Info[playerid] [Score] = dini_Int(file,"Score");
                Info[playerid] [Cash] = dini_Int(file,"Cash");
                Info[playerid] [Jailed] = dini_Int(file,"Jailed");
                Info[playerid] [JTime] = dini_Int(file,"JTime");
                SetPlayerScore(playerid,Info[playerid] [Score]);
                GivePlayerMoney(playerid,Info[playerid] [Cash]);
                SpawnPlayer(playerid);
                TogglePlayerSpectating(playerid,true);
                TogglePlayerSpectating(playerid,false);
                SetPlayerPos(playerid,-1953.4885,1339.2349,7.1875);
                SetPlayerFacingAngle(playerid,174.3617);
            }
            else
            {
                if(IsWarned[playerid] <=3)
                {
                    IsWarned[playerid]++;
                    SendClientMessage(playerid,-1,warn);
                }
                else
                {
                    SendClientMessage(playerid,-1,warn);
                    SendClientMessageToAll(-1,kicked);
                    Kick(playerid);
                }
                return ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","--------------------\nWelcome back to RealTime Roleplay!\nPlease type in your password and hit login.\nHope you have fun on RealTime Roleplay\n--------------------","Login","");
            }
        }
        return 1;
    }
    if(dialogid == 5)
    {
        if (response)
        {
            switch (listitem)
            {
                case 0:
                {
                    dini_Set(file,"Gender","Male");
                    dini_IntSet(file,"Skin",male[random(sizeof(male))]);
                }
                case 1:
                {
                    dini_Set(file,"Gender","Female");
                    dini_IntSet(file,"Skin",female[random(sizeof(female))]);
                }
            }
            TogglePlayerSpectating(playerid,true);
            TogglePlayerSpectating(playerid,false);
            SetPlayerPos(playerid,-1953.4885,1339.2349,7.1875);
            SetPlayerFacingAngle(playerid,174.3617);
            Info[playerid] [Skin] = dini_Int(file,"Skin");
        }
        return 1;
    }
Reply
#2

Any solutions?
Reply
#3

Show us the OnDialogResponse callback
Reply
#4

Is the string in your file variable a perfect case match? serverFFS uses Debian and you're probably using Windows - Windows does not force case sensitivity on files, whereas Debian/Linux does which is probably your problem.

If you don't understand what I just said:
http://en.wikipedia.org/wiki/Case_sensitivity
Reply
#5

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Is the string in your file variable a perfect case match? serverFFS uses Debian and you're probably using Windows - Windows does not force case sensitivity on files, whereas Debian/Linux does which is probably your problem.

If you don't understand what I just said:
http://en.wikipedia.org/wiki/Case_sensitivity
Yes it is. The thing is, everything works on my windows. The On dialog response is functioning properly, i have debugged it. Its just not working on the server ffs servers.



My gender selection dialog wont show, so its something to do with dialog id 3
Reply
#6

Put the dialog response in the main post
Reply
#7

bumps
Reply
#8

Help please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)