what's wrong?
#1

I made a dialog with helping but its not works, only when I type /help its apear that tabel and when I want open one its close it
pawn Код:
#define DIALOG_LOG 12213420
#define DIALOG_REG 22158
#define DIALOG_HELP 153241542
#define DIALOG_HELP1 4353
#define DIALOG_HELP2 556543

if(strcmp("/help", cmdtext, true) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence \nPlayer's Commands \nSide Jobs \nRPG Jobs \nMedals","Enter","Cancel");
    return 1;
    }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)//if your using only one dialog this isn't needed but you never know.
        {
        case DIALOG_HELP://??? ??????.
            {
            if(!response) return 0;
            switch(listitem)// ???????? ??????? ????????.
            {
                case 0://the first item in the list
                {
                ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Money","In this server not using dollars but using GCash.\n For see your GCash type /GCash !\nYou can earn money by your job or colleting 15 GCash every game day in bank at banktime ( 06:00 )","OK","");
                }
                case 1:
                {
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Admins","There are admins, they have to take care about all players.\nAlso they making events for have fun players.\nYou can see who admins are online, type /admins.\nIf you have any question then you can use /@.\nIf you saw a cheater/heacker then /report him !","OK","");
                }
                case 2:
                {
                ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"How to get a job","There are Job House, there you can get a job. Type /call 786 and follow red mark on the map/radar.\nWhen you will in Job House you can check what jobs is available for you /jobavailable.","OK","");
                }
                case 3:
                {
                ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Weapon Licence","There are weapon licence, with it you can get DM job.\nFor get a weapon licence you have to go to LS Ammu-nation and buy it.\nAlso you will get empty weapons' skills, you can get full if you want","OK","");
                }
                case 4:
                {
                ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"Player's Commands","/help ---> displays the help menu\n/enter or /en ---> enters a building when at an icon\n/exit or /ex ---> exits a building when you are at the door\n* mineralo <message> ---> says a message to all players\n/shout <message> ---> shouts a message to all players\n/pm <id> <message> ---> send a private message to a player\n/afk ---> lists the afk players\n/goafk ---> go into afk mode\n/back ---> return from afk mode","OK","");
                }
                case 5:
                {
                ShowPlayerDialog(playerid,DIALOG_HELP1,DIALOG_STYLE_LIST,"Side Jobs","Sweeper\nFisher\nTrasher","OK","BACK");
                }
                case 6:
                {
                ShowPlayerDialog(playerid,DIALOG_HELP2,DIALOG_STYLE_LIST,"RPG Jobs","Citizen\nCriminal\nHitman","OK","BACK");
                }
                case 7:
                {
                ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"Medals","","OK","");
                }
             }
            return 0;
             }
        case DIALOG_HELP1:
        {
            if(!response) return ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence\nPlayer's Commands\nSide Jobs\nRPG Jobs\nMedals","Enter","Cancel");
            switch(listitem)// ???????? ??????? ????????.
            {
                case 0://the first item in the list
                {
                ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Sweeper","Sweepers cars you can find at Los Santons Docks\nWhen you enter one press 2 ( sub-mission button ) to start sweeping\nYou'll earn 2 GCash every 2 minutes while moving","OK","");
                }
                case 1:
                {
                ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"Fisher","Fishing rod you can find at Santa Maria Beach\nWhen you're close one type /fish to start fishing\nYou'll get 1 fish in your /foodstock in a random time\nIt's depents how much time will take to catch it !","OK","");
                }
                case 2:
                {
                ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Trasher","Trashmaster cars you can find near spawn of Public Service Driver\nWhen you enter one press 2 ( sub-mission button ) to start job !\nYou'll have to collect all trash from city\nAfter collecting all the trash head to the dump to get bonus !","OK","");
                }
            }
            return 1;
        }
        case DIALOG_HELP2:
        {
            if(!response) return ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence\nPlayer's Commands\nSide Jobs\nRPG Jobs\nMedals","Enter","Cancel");
            switch(listitem)// ???????? ??????? ????????.
            {
                case 0:
                {
                ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"Citizen","Citizen is not a job, this means that you are unemployed and you should get a job as soon as possible\nAs a citizen you start with a Check +20 GCash. You can exchange this at the Bank for GCash. Type /use 1 inside of The Bank.\nFor a job you need 25 GCash\nYou can earn money by doing Side Jobs, or collecting 15 GCash from Bank ( every day between 06:00 and 07:0 )","OK","");
                }
                case 1:
                {
                ShowPlayerDialog(playerid,12,DIALOG_STYLE_MSGBOX,"Criminal","Their job aim is to rob stores and kill the Authorities !\nThey receive 2ec per Authority member killed\nRequirements:\n1)You need to be citizen !\n2)You need to own a Weapon Licence\n3)You need a ping of less than 300\nIf you requeremnts all them then you can get Criminal job from Job House","OK","");
                }
                case 2:
                {
                ShowPlayerDialog(playerid,13,DIALOG_STYLE_MSGBOX,"Hitman","The Aim of Hitman is to protect the Godfather, killing hits and contracts !\nThey receive 5 GCash for killing the mayor.\nThey receive the GCash amount for killing the hit\nRequirements:\n1)You need own a Weapon licence\n2)You need a ping of less than 300.\n3)You need 4 items:Diamond,Secret Document (complete),Hitman's Licence,Godfather's agreement!","OK","");
                }
            }
            return 1;
        }
help me plz
Reply
#2

#define DIALOG_LOG 8877
#define DIALOG_REG 8564
#define DIALOG_HELP 5556
#define DIALOG_HELP1 4353
#define DIALOG_HELP2 8414

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)//if your using only one dialog this isn't needed but you never know.
        
{
        case 
DIALOG_HELP://??? ??????.
            
{
            if(!
response) return 0;
            switch(
listitem)// ???????? ??????? ????????.
            
{
                case 
0://the first item in the list
                
{
                
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Money","In this server not using dollars but using GCash.\n For see your GCash type /GCash !\nYou can earn money by your job or colleting 15 GCash every game day in bank at banktime ( 06:00 )","OK","");
                }
                case 
1:
                {
                
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Admins","There are admins, they have to take care about all players.\nAlso they making events for have fun players.\nYou can see who admins are online, type /admins.\nIf you have any question then you can use /@.\nIf you saw a cheater/heacker then /report him !","OK","");
                }
                case 
2:
                {
                
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"How to get a job","There are Job House, there you can get a job. Type /call 786 and follow red mark on the map/radar.\nWhen you will in Job House you can check what jobs is available for you /jobavailable.","OK","");
                }
                case 
3:
                {
                
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Weapon Licence","There are weapon licence, with it you can get DM job.\nFor get a weapon licence you have to go to LS Ammu-nation and buy it.\nAlso you will get empty weapons' skills, you can get full if you want","OK","");
                }
                case 
4:
                {
                
ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"Player's Commands","/help ---> displays the help menu\n/enter or /en ---> enters a building when at an icon\n/exit or /ex ---> exits a building when you are at the door\n/me <message> ---> says a message to all players\n/shout <message> ---> shouts a message to all players\n/pm <id> <message> ---> send a private message to a player\n/afk ---> lists the afk players\n/goafk ---> go into afk mode\n/back ---> return from afk mode","OK","");
                }
                case 
5:
                {
                
ShowPlayerDialog(playerid,DIALOG_HELP1,DIALOG_STYLE_LIST,"Side Jobs","Sweeper\nFisher\nTrasher","OK","BACK");
                }
                case 
6:
                {
                
ShowPlayerDialog(playerid,DIALOG_HELP2,DIALOG_STYLE_LIST,"RPG Jobs","Citizen\nCriminal\nHitman","OK","BACK");
                }
                case 
7:
                {
                
ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"Medals","","OK","");
                }
             }
           return 
1;
             }
        case 
DIALOG_HELP1:
        {
            if(!
response) return ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence\nPlayer's Commands\nSide Jobs\nRPG Jobs\nMedals","Enter","Cancel");
            switch(
listitem)// ???????? ??????? ????????.
            
{
                case 
0://the first item in the list
                
{
                
ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Sweeper","Sweepers cars you can find at Los Santons Docks\nWhen you enter one press 2 ( sub-mission button ) to start sweeping\nYou'll earn 2 GCash every 2 minutes while moving","OK","");
                }
                case 
1:
                {
                
ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"Fisher","Fishing rod you can find at Santa Maria Beach\nWhen you're close one type /fish to start fishing\nYou'll get 1 fish in your /foodstock in a random time\nIt's depents how much time will take to catch it !","OK","");
                }
                case 
2:
                {
                
ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Trasher","Trashmaster cars you can find near spawn of Public Service Driver\nWhen you enter one press 2 ( sub-mission button ) to start job !\nYou'll have to collect all trash from city\nAfter collecting all the trash head to the dump to get bonus !","OK","");
                }
            }
            return 
1;
        }
        case 
DIALOG_HELP2:
        {
            if(!
response) return ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence\nPlayer's Commands\nSide Jobs\nRPG Jobs\nMedals","Enter","Cancel");
            switch(
listitem)// ???????? ??????? ????????.
            
{
                case 
0:
                {
                
ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"Citizen","Citizen is not a job, this means that you are unemployed and you should get a job as soon as possible\nAs a citizen you start with a Check +20 GCash. You can exchange this at the Bank for GCash. Type /use 1 inside of The Bank.\nFor a job you need 25 GCash\nYou can earn money by doing Side Jobs, or collecting 15 GCash from Bank ( every day between 06:00 and 07:0 )","OK","");
                }
                case 
1:
                {
                
ShowPlayerDialog(playerid,12,DIALOG_STYLE_MSGBOX,"Criminal","Their job aim is to rob stores and kill the Authorities !\nThey receive 2ec per Authority member killed\nRequirements:\n1)You need to be citizen !\n2)You need to own a Weapon Licence\n3)You need a ping of less than 300\nIf you requeremnts all them then you can get Criminal job from Job House","OK","");
                }
                case 
2:
                {
                
ShowPlayerDialog(playerid,13,DIALOG_STYLE_MSGBOX,"Hitman","The Aim of Hitman is to protect the Godfather, killing hits and contracts !\nThey receive 5 GCash for killing the mayor.\nThey receive the GCash amount for killing the hit\nRequirements:\n1)You need own a Weapon licence\n2)You need a ping of less than 300.\n3)You need 4 items:Diamond,Secret Document (complete),Hitman's Licence,Godfather's agreement!","OK","");
                }
            }
            return 
1;
        } 
Your problem was here, it was returning 0.
PHP код:
              }
            return 
0// <this
             
}
        case 
DIALOG_HELP1:
        { 
so i change it to 1.

Should work now.
Reply
#3

same problem
tot asha, ce sa fac
Reply
#4

any ideas?
Reply
#5

Try now.

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]){
    switch(
dialogid){
        case 
DIALOG_HELP:{
            if(!
response) return 0;
            switch(
listitem){
                case 
0ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Money","In this server not using dollars but using GCash.\n For see your GCash type /GCash !\nYou can earn money by your job or colleting 15 GCash every game day in bank at banktime ( 06:00 )","OK","");
                case 
1ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Admins","There are admins, they have to take care about all players.\nAlso they making events for have fun players.\nYou can see who admins are online, type /admins.\nIf you have any question then you can use /@.\nIf you saw a cheater/heacker then /report him !","OK","");
                case 
2ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"How to get a job","There are Job House, there you can get a job. Type /call 786 and follow red mark on the map/radar.\nWhen you will in Job House you can check what jobs is available for you /jobavailable.","OK","");
                case 
3ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Weapon Licence","There are weapon licence, with it you can get DM job.\nFor get a weapon licence you have to go to LS Ammu-nation and buy it.\nAlso you will get empty weapons' skills, you can get full if you want","OK","");
                case 
4ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"Player's Commands","/help ---> displays the help menu\n/enter or /en ---> enters a building when at an icon\n/exit or /ex ---> exits a building when you are at the door\n/me <message> ---> says a message to all players\n/shout <message> ---> shouts a message to all players\n/pm <id> <message> ---> send a private message to a player\n/afk ---> lists the afk players\n/goafk ---> go into afk mode\n/back ---> return from afk mode","OK","");
                case 
5ShowPlayerDialog(playerid,DIALOG_HELP1,DIALOG_STYLE_LIST,"Side Jobs","Sweeper\nFisher\nTrasher","OK","BACK");
                case 
6ShowPlayerDialog(playerid,DIALOG_HELP2,DIALOG_STYLE_LIST,"RPG Jobs","Citizen\nCriminal\nHitman","OK","BACK");
                case 
7ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"Medals","","OK","");
            }
            return 
1;
        }
        case 
DIALOG_HELP1:{
            if(!
response) return ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence\nPlayer's Commands\nSide Jobs\nRPG Jobs\nMedals","Enter","Cancel");
             switch(
listitem){
                case 
0ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Sweeper","Sweepers cars you can find at Los Santons Docks\nWhen you enter one press 2 ( sub-mission button ) to start sweeping\nYou'll earn 2 GCash every 2 minutes while moving","OK","");
                case 
1ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"Fisher","Fishing rod you can find at Santa Maria Beach\nWhen you're close one type /fish to start fishing\nYou'll get 1 fish in your /foodstock in a random time\nIt's depents how much time will take to catch it !","OK","");
                case 
2ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Trasher","Trashmaster cars you can find near spawn of Public Service Driver\nWhen you enter one press 2 ( sub-mission button ) to start job !\nYou'll have to collect all trash from city\nAfter collecting all the trash head to the dump to get bonus !","OK","");
              }
            return 
1;
        }
        case 
DIALOG_HELP2:{
            if(!
response) return ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help","GCash \nAdmins \nHow to get a job \nWeapon Licence\nPlayer's Commands\nSide Jobs\nRPG Jobs\nMedals","Enter","Cancel");
            switch(
listitem){
                case 
0ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"Citizen","Citizen is not a job, this means that you are unemployed and you should get a job as soon as possible\nAs a citizen you start with a Check +20 GCash. You can exchange this at the Bank for GCash. Type /use 1 inside of The Bank.\nFor a job you need 25 GCash\nYou can earn money by doing Side Jobs, or collecting 15 GCash from Bank ( every day between 06:00 and 07:0 )","OK","");
                case 
1ShowPlayerDialog(playerid,12,DIALOG_STYLE_MSGBOX,"Criminal","Their job aim is to rob stores and kill the Authorities !\nThey receive 2ec per Authority member killed\nRequirements:\n1)You need to be citizen !\n2)You need to own a Weapon Licence\n3)You need a ping of less than 300\nIf you requeremnts all them then you can get Criminal job from Job House","OK","");
                case 
2ShowPlayerDialog(playerid,13,DIALOG_STYLE_MSGBOX,"Hitman","The Aim of Hitman is to protect the Godfather, killing hits and contracts !\nThey receive 5 GCash for killing the mayor.\nThey receive the GCash amount for killing the hit\nRequirements:\n1)You need own a Weapon licence\n2)You need a ping of less than 300.\n3)You need 4 items:Diamond,Secret Document (complete),Hitman's Licence,Godfather's agreement!","OK","");
            }
            return 
1;
        }
    }
    return 
1;

Reply
#6

same problem before its worked just how I added its stopped work
Reply
#7

Did you changed the dialog numbers?

#define DIALOG_HELP 5556
#define DIALOG_HELP1 5558
#define DIALOG_HELP2 5557
Reply
#8

#define DIALOG_HELP 153241542
#define DIALOG_HELP1 4353
#define DIALOG_HELP2 556543
Reply
#9

Change them.... with this

#define DIALOG_HELP 5556
#define DIALOG_HELP1 5558
#define DIALOG_HELP2 5557
Reply
#10

ms, lucreaza ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)