Dialog buttons Help
#1

When i press the cancel button on the dialog it cancels but i freeze

also when i select as skill it freezes can yall help

Код:
	if(dialogid == DIALOG_SKILLS)
{
    if(response)
    {
        switch(listitem)
        {
            case 0:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}RAPIST INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Rapist commands.\n{FFFFFF}Job: Your job is to rape players and infect them with STI's such as Chlamydia.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,22,100);
                GivePlayerWeapon(playerid,4,1);
                gTeam[playerid] = TEAM_RAPIST;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] =0;
            }
            case 1:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}DRUG DEALER INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Drug Dealer commands.\n{FFFFFF}Job: To supply other players with drugs. Make sure they pay up!\n{FFFFFF}Respond to players when they call for you with the /drugdealer command.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,22,50);
                GivePlayerWeapon(playerid,28,100);
                GivePlayerWeapon(playerid,5,1);
                gTeam[playerid] = TEAM_DRGDEL;
                SetPlayerToTeamColour(playerid);
                HasWeed[playerid] = 50;
                HasHeroin[playerid] = 3;
                CanChooseSkill[playerid] =0;
            }
            case 2:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}GUN DEALER INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Gun Dealer commands.\n{FFFFFF}Job: To sell weapons to other players. Make sure the pay up!\n{FFFFFF}Respond to players when they call for you with the /gundealer command.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,30,500);
                GivePlayerWeapon(playerid,32,150);
                gTeam[playerid] = TEAM_GUNDEL;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] = 0;
            }
            case 3:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}HITMAN INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Hitman commands.\n{FFFFFF}Job: To kill players that appear on the /hitlist. Do not kill people unless they are on this list.\n{FFFFFF}Respond to the /hitlist whenever players place a hit on someone using /placehit.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,27,250);
                GivePlayerWeapon(playerid,23,100);
                GivePlayerWeapon(playerid,31,500);
                gTeam[playerid] = TEAM_HITMAN;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] = 0;
            }
            case 4:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}CAR JACKER INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Car Jacker commands.\n{FFFFFF}Job: You can steal vehicles that people are driving or have bought and sell them to the Shipyard.\n{FFFFFF}Search around San Fierro for cars that you can steal, you can then take these cars to the Shipyard for money.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,6,1);
                GivePlayerWeapon(playerid,24,200);
                GivePlayerWeapon(playerid,28,300);
                gTeam[playerid] = TEAM_CARJACK;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] = 0;
            }
            case 5:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}KIDNAPPER INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Kidnapper commands.\n{FFFFFF}Job: You can kidnap people using the /kidnap command, infect them with STD's and do watever you want with them.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,27,250);
                GivePlayerWeapon(playerid,23,100);
                GivePlayerWeapon(playerid,30,500);
                gTeam[playerid] = TEAM_KIDNAP;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] = 0;
            }
            case 6:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}THIEF INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Thief commands.\n{FFFFFF}Job: To rob as many places and people as you can to make money.\n{FFFFFF}Use /robskill to see your robbing level and see what you can rob.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,30,500);
                GivePlayerWeapon(playerid,23,70);
                GivePlayerWeapon(playerid,2,1);
                gTeam[playerid] = TEAM_THIEF;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] = 0;
            }
            case 7:
            {
                ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"{4169FF}TERRORIST INFORMATION:","{FFFFFF}Commands: Type /commands for a list of Terrorist commands.\n{FFFFFF}Job: To blow things up in San Fierro.\n{FFFFFF}You can buy C4 from the bomb shop to use in your terrorism.\n{FFFFFF}Use /tskill to see your terrorism level and what you can blow up.\n{FFFFFF}Please remember to abide by the server /rules, or you may be banned.","Ok","Cancel");
                GivePlayerWeapon(playerid,30,500);
                GivePlayerWeapon(playerid,34,60);
                GivePlayerWeapon(playerid,23,150);
                gTeam[playerid] = TEAM_TERRO;
                SetPlayerToTeamColour(playerid);
                CanChooseSkill[playerid] = 0;   

            }
        }
    }
    return 1;
}
Reply
#2

Is this the only dialog in your script?
Reply
#3

No its not sir
Reply
#4

Well, if he freeze's, you can always TogPlayerControllable(playerid, 1); - this will unfreeze the player.
Hopes this helps
Reply
#5

Quote:
Originally Posted by Sandiel
Посмотреть сообщение
Well, if he freeze's, you can always TogPlayerControllable(playerid, 1); - this will unfreeze the player.
Hopes this helps
I believe he didn't get froze apparently his dialog didn't respond

Well, for that you must put your DIALOG filter-script on the top of all others and secondly check if your dialog id's are not conflicting with each other.

-FalconX
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)