SA-MP Forums Archive
Dialog help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog help (/showthread.php?tid=591558)



Dialog help - N0FeaR - 13.10.2015

Trying to making a rp test, here result anyone know the problem?, just say none.



PHP код:
case 154:
        {
             if(
strlen(PlayerInfo[playerid][pOOC]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"1);
                
ShowPlayerDialog(playerid,155DIALOG_STYLE_INPUT"Tutorial""What is the definition of Metagame?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
155:
        {
            if(
strlen(PlayerInfo[playerid][pMetagame]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"2);
                
ShowPlayerDialog(playerid,156DIALOG_STYLE_INPUT"Tutorial""What is the definition of Metagame?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
156:
        {
            if(
strlen(PlayerInfo[playerid][pRevenge]) < 5)
            {
                  
SetPVarInt(playerid"AppSetup"3);
                
ShowPlayerDialog(playerid,157DIALOG_STYLE_INPUT"Tutorial""What is the definition of Revenge Killing?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);            
            
        }        
        case 
157:
        {
            if(
strlen(PlayerInfo[playerid][pRoleplay]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"4);
                
ShowPlayerDialog(playerid,158DIALOG_STYLE_INPUT"Tutorial""What is the definition of Roleplay?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
158:
        {
            if(
strlen(PlayerInfo[playerid][pPowergame]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"5);
                
ShowPlayerDialog(playerid,159DIALOG_STYLE_INPUT"Tutorial""What is the definition of Powergame?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
159:
        {
             if(
strlen(PlayerInfo[playerid][pQuest1]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"6);
                
ShowPlayerDialog(playerid,160DIALOG_STYLE_INPUT"Tutorial""What do you do if you get Deathmatched?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
160:
        {
             if(
strlen(PlayerInfo[playerid][pQuest2]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"7);
                
ShowPlayerDialog(playerid,161DIALOG_STYLE_INPUT"Tutorial""You are being arrested ICly you...""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
161:
        {
             if(
strlen(PlayerInfo[playerid][pQuest3]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"8);
                
ShowPlayerDialog(playerid,162DIALOG_STYLE_INPUT"Tutorial""What do you do if you spot a hacker?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
162:
        {
             if(
strlen(PlayerInfo[playerid][pQuest4]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"9);
                
ShowPlayerDialog(playerid,163DIALOG_STYLE_INPUT"Tutorial""Are you allowed to rob somebody that is under 20 Time-In-LS?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
163:
        {
             if(
strlen(PlayerInfo[playerid][pQuest5]) < 5)
            {
                
SetPVarInt(playerid"AppSetup"10);
                
ShowPlayerDialog(playerid,164DIALOG_STYLE_INPUT"Tutorial""Are you allowed to use /report to talk to an admin?""Next""Cancel");
            }
            else 
CallRemoteFunction("TutorialAnswers","i",playerid);
        }
        case 
164:
        {
            new 
string[128], playersip[128];
            
GetPlayerIp(playerid,playersip,sizeof(playersip));
            
DeletePVar(playerid,"AppSetup"), DeletePVar(playerid,"TutQuestAmount");
            
SendClientMessage(playerid,COLOR_WHITE,"Answers posted.");
            
format(stringsizeof(string), "RegWarn: %s posted their application answers type /answers %d to view."PlayerName(playerid), playerid);
            
SendAdminAndRegMessage(0xFF0000FF,string);
            
format(stringsizeof(string), "RegWarn: PlayersIP: %s - PlayersDNS: %s."playersipPlayerInfo[playerid][pHost]);
            
SendAdminAndRegMessage(0xFF0000FF,string); 



Re: Dialog help - Unte99 - 13.10.2015

Show us the code where you set the players answers.


Re: Dialog help - N0FeaR - 13.10.2015

This?

PHP код:
}
        if(
GetPVarInt(playerid"Tut") == 0)
        {
            if(
GetPVarInt(playerid"Approve") == 0)
            {
                
strmid(PlayerInfo[playerid][pOOC], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pMetagame], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pRevenge], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pRoleplay], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pPowergame], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest1], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest2], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest3], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest4], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest5], "None"0strlen("None"), 255);
                
OnConnectInit(playerid);
                
//SetPlayerWorldBounds(playerid, -1857.7467, 57.3635, 1054.7097, 1728.326);
                
SetPlayerColor(playerid,0x80008096);
                
SetPlayerVirtualWorld(playerid,1);
                
SetPlayerInterior(playerid,14);
                
SetPlayerPos(playerid,-1857.746757.36351054.7097);
                
TogglePlayerControllableEx(playerid,false);
                
SetPVarInt(playerid"Mute"1);
                
SetPVarInt(playerid"Tut"0);
                
SetPlayerSkin(playerid,25);
                
SetPVarInt(playerid"TutQuestAmount"0);
                
ShowPlayerDialog(playerid,154DIALOG_STYLE_INPUT"Tutorial""What is OOC and IC stand for?""Next""Cancel");
                return 
CallRemoteFunction("TutorialAnswers","i",playerid); 



Re: Dialog help - Unte99 - 13.10.2015

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
This?

PHP код:
}
        if(
GetPVarInt(playerid"Tut") == 0)
        {
            if(
GetPVarInt(playerid"Approve") == 0)
            {
                
strmid(PlayerInfo[playerid][pOOC], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pMetagame], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pRevenge], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pRoleplay], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pPowergame], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest1], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest2], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest3], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest4], "None"0strlen("None"), 255);
                
strmid(PlayerInfo[playerid][pQuest5], "None"0strlen("None"), 255);
                
OnConnectInit(playerid);
                
//SetPlayerWorldBounds(playerid, -1857.7467, 57.3635, 1054.7097, 1728.326);
                
SetPlayerColor(playerid,0x80008096);
                
SetPlayerVirtualWorld(playerid,1);
                
SetPlayerInterior(playerid,14);
                
SetPlayerPos(playerid,-1857.746757.36351054.7097);
                
TogglePlayerControllableEx(playerid,false);
                
SetPVarInt(playerid"Mute"1);
                
SetPVarInt(playerid"Tut"0);
                
SetPlayerSkin(playerid,25);
                
SetPVarInt(playerid"TutQuestAmount"0);
                
ShowPlayerDialog(playerid,154DIALOG_STYLE_INPUT"Tutorial""What is OOC and IC stand for?""Next""Cancel");
                return 
CallRemoteFunction("TutorialAnswers","i",playerid); 
No. OnDialogResponse code, where you set the players answers.


Re: Dialog help - N0FeaR - 13.10.2015

Quote:
Originally Posted by Unte99
Посмотреть сообщение
No. OnDialogResponse code, where you set the players answers.
Sorry if i am slow but what u mean exactly with set the players answers?


Re: Dialog help - Unte99 - 13.10.2015

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
Sorry if i am slow but what u mean exactly with set the players answers?
Ok. Tell me how does the player answer what is the definition of OOC and IC definition? Where does the player write the text?


Re: Dialog help - N0FeaR - 13.10.2015

Quote:
Originally Posted by Unte99
Посмотреть сообщение
Ok. Tell me how does the player answer what is the definition of OOC and IC definition? Where does the player write the text?
I just sloved it

this was missing lol

PHP код:
strmid(PlayerInfo[playerid][pOOC], inputtext0strlen(inputtext), 255); 
thx anyway