Help me to Fix This .
#1

Hello .

today i'm making this script but when i want to test it in my server it get fail.. when i do /cmds it open the command .. then when i do /t it open command again.. it not open teleport list it fail in /rules and /ghelp... pls help me...

Pawn
Код:
if (strcmp("/cmds", cmdtext))
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Commands:","/w = Weapons\n/duel [id] = 1vs1\n/count = Countdown\n/t = Teleport List\n/ghelp = Group Commands\n/myhouses = View Your House\n/v = Vehicle\n/f = Flip\n/vehrepair = Repair\n/tune = Tune\n/report = Report Hacker/Cheater\n/cig = Smoking\n/beer = Drinking\n/sprunk = Drinking\n/animlist = Animations","Close","");
    return 1;
}
if (strcmp("/t", cmdtext))
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Teleport:","/drift1 - /drift2 - /drift3 - /drift4 - /drift5\n/drift6 - /drift7 - /drift8 - /drift9 - /drift10\n/drift11 - /drift12 - /driftschool - /skydrift\n/arch - /trans - /track1 - /driftcircle1 - /dm1 - dm2","Close","");
    return 1;
}

if (strcmp("/rules", cmdtext))
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Rules:","1.Cursing over player not allowed.\n2.Do not spam or else you'll be kicked!.\n3.Hacks is not allowed here, except handling lines.\n5.Respect the other players, and admins too.\n5.Please follow all the rules and have fun! =)","Close","");
    return 1;
}

if (strcmp("/ghelp", cmdtext))
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Group Command:","/grc - Creates a group. - /grl - Leaves your current group. - /gri - Invites a person to your group (Leader Only).\n/grlead - Gives someone else the leader position (Leader Only). - /grj - requests to join someone's group. - /grk - Kicks a member from the group (Leader Only). - /gm - Sends a message to all group members.\n/grouplist - Lists all members in a certain group. - /groups - Lists all groups.","Close","");
    return 1;
}
sorry for my bad english..
Reply
#2

pawn Код:
if (strcmp("/cmds", cmdtext,true)==0)
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Commands:","/w = Weapons\n/duel [id] = 1vs1\n/count = Countdown\n/t = Teleport List\n/ghelp = Group Commands\n/myhouses = View Your House\n/v = Vehicle\n/f = Flip\n/vehrepair = Repair\n/tune = Tune\n/report = Report Hacker/Cheater\n/cig = Smoking\n/beer = Drinking\n/sprunk = Drinking\n/animlist = Animations","Close","");
    return 1;
}
if (strcmp("/t", cmdtext,true)==0)
{
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Teleport:","/drift1 - /drift2 - /drift3 - /drift4 - /drift5\n/drift6 - /drift7 - /drift8 - /drift9 - /drift10\n/drift11 - /drift12 - /driftschool - /skydrift\n/arch - /trans - /track1 - /driftcircle1 - /dm1 - dm2","Close","");
    return 1;
}

if (strcmp("/rules", cmdtext,true)==0)
{
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Rules:","1.Cursing over player not allowed.\n2.Do not spam or else you'll be kicked!.\n3.Hacks is not allowed here, except handling lines.\n5.Respect the other players, and admins too.\n5.Please follow all the rules and have fun! =)","Close","");
    return 1;
}

if (strcmp("/ghelp", cmdtext,true)==0)
{
    ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"Group Command:","/grc - Creates a group. - /grl - Leaves your current group. - /gri - Invites a person to your group (Leader Only).\n/grlead - Gives someone else the leader position (Leader Only). - /grj - requests to join someone's group. - /grk - Kicks a member from the group (Leader Only). - /gm - Sends a message to all group members.\n/grouplist - Lists all members in a certain group. - /groups - Lists all groups.","Close","");
    return 1;
}
You need to define unique dialog ids for every ShowPlayerDialog you create at the beggining of your script.
Reply
#3

unique ids dialog how that I want to define ?? sorry i'm beginner..
Reply
#4

Quote:
Originally Posted by whcool
Посмотреть сообщение
unique ids dialog how that I want to define ?? sorry i'm beginner..
Did you notice those 1,2,3,4 numbers in sequence in above script ? Those are dialog ids, which will be used in OnDialogResponse callback to identify which particular dialog was called. Read these articles : https://sampwiki.blast.hk/wiki/ShowPlayerDialog and https://sampwiki.blast.hk/wiki/OnDialogResponse for better understanding about them.Dialog id for every dialog has to be unique always.
Reply
#5

sorry the fail is.. when i do /cmds it work..and i do what ever like /adsnjadj /ahfjjf i will show teleport...same when i do /rules and /ghelp..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)