KamikazeSripterul
Well-known member
- Joined
- Jun 30, 2019
- Messages
- 353
- Reaction score
- 23
I tried to make a long dialog in which you can have several choices but certain this script is right because as I try to join the game, it shows a lot of errors in chat and then it crashes. What's wrong with the script?
{$CLEO .cs}
thread "CivilCMD"
0000:
repeat
wait 0
until SAMP.Available()
// Commands
0B34: "civilcmd" @CivilCMD
0B34: "maincmd" @MainCMD
// When game starts shows:
chatmsg "{ff0000}CivilCMD for bugged.ro." -1
chatmsg "{ff0000}Use {ffff00}/civilcmd {ff0000}for more detail" -1
while true
wait 0
if SAMP.DialogRespond(266, 2@, 3@, 0)
then
if 2@ == 1
then
if 3@ == 0
then
0AC6: 4@ = label @Jobs
SAMP.ShowDialog(255, "{fff252}» {57377c}Jobs", 4@, "Select", "Back", 2)
else
if 3@ == 1
then
0AC6: 4@ = label @Shortcuts
SAMP.ShowDialog(277, "{fff252}» {57377c}Shortcuts", 4@, "Select", "Back", 2)
else
if 2@ == 0
then
0AC6: 4@ = label @MainCMD offset
SAMP.ShowDialog(266, "{c8a5e7}» CivilCMD {ff0000}Jobs {00ff00}Prescurtari" , 4@, "Select" , "Exit", 2)
0B49: samp set_current_dialog_list_item -1
end
end
end
end
end
if 0B3C: samp is_dialog_responded id 255 button 2@ list_item 3@ input_text 0
then
if 2@ == 1
then
if 3@ == 0
then
0AC6: 4@ = label @JobList
SAMP.ShowDialog(256, "{ff0000}» {57377c}Jobs", 4@, "Menu", "Back", 2)
else
if 3@ == 1
then
0AC6: 4@ label @JobHelp
SAMP.ShowDialog(257, "{00ffff}» {57377c}Job Help", 4@, "Exit", "", 2)
else
if 2@ == 0
then
0AC6: 4@ = label @Jobs
SAMP.ShowDialog(255, "{fff252}» {57377c}Jobs", 4@, "Select", "Back", 2)
end
end
end
end
END
// Introduction
:CivilCMD
if SAMP.IsCommandTyped(0@)
0AC6: 17@ = label @CivilCMDText offset
SAMP.ShowDialog(7777, "» CivilCMD", 17@, "Close", "", 0)
SAMP.CmdRet
:CivilCMDText
HEX
43 69 76 69 6C 43 4D 44 20 74 65 20 61 6A 75 74 61 20 63 75 20
6F 72 69 63 65 20 70 65 20 62 75 67 67 65 64 2E 72 6F 21 20
54 6F 74 20 63 65 20 74 72 65 62 75 69 65 20 73 61 20 73 74
69 69 20 64 65 73 70 72 65 20 73 65 72 76 65 72 2E 20 4A 6F
62 73 20 26 20 73 68 6F 72 74 63 75 74 73 2E 0A 54 61 73 74
65 61 7A 61 20 2F 6D 61 69 6E 63 6D 64 20 70 65 6E 74 72 75
20 61 20 61 63 63 65 73 61 20 6D 61 69 20 6D 75 6C 74 65 20
64 65 74 61 6C 69 69 2E 00
END
// Main / Extract
:MainCMD
if SAMP.IsCommandTyped(0@)
0AC6: 4@ = label @ChoiceJS offset
SAMP.ShowDialog(266, "{c8a5e7}» CivilCMD {ff0000}Jobs {00ff00}Prescurtari" , 4@, "Select" , "Exit", 2)
SAMP.CmdRet()
:ChoiceJS
HEX
">> Jobs <<" A
">> Prescurtari <<" 0
END
:Jobs
HEX
">> Jobs <<" A // :JobList
">> (!) Ajutor (!) <<" 0 // :JobHelp
END
:JobList
HEX
"{ff0000}>> Citeste-ma! <<" A
">> Fisher" A
">> Arms Dealer" A
">> Detective" A
">> Mechanic" A
">> Car Jacker" A
">> Pizza Boy" A
">> Trucker" A
">> Bus Driver" A
">> Drug Dealer" A
">> Garbage Man" A
">> Farmer" A
">> Boat Transporter" 0
END
:JobHelp
HEX
"Cu ce ma ajuta selectarea unui job din lista anterioara?" A
"Ce se intampla daca selectez un job?" 0
END
:Shortcuts
HEX
">> Prescurtari <<" A // :ShortcutsList
">> (!) Ajutor (!) <<" 0 // :ShortcutsHelp
END
{$CLEO .cs}
thread "CivilCMD"
0000:
repeat
wait 0
until SAMP.Available()
// Commands
0B34: "civilcmd" @CivilCMD
0B34: "maincmd" @MainCMD
// When game starts shows:
chatmsg "{ff0000}CivilCMD for bugged.ro." -1
chatmsg "{ff0000}Use {ffff00}/civilcmd {ff0000}for more detail" -1
while true
wait 0
if SAMP.DialogRespond(266, 2@, 3@, 0)
then
if 2@ == 1
then
if 3@ == 0
then
0AC6: 4@ = label @Jobs
SAMP.ShowDialog(255, "{fff252}» {57377c}Jobs", 4@, "Select", "Back", 2)
else
if 3@ == 1
then
0AC6: 4@ = label @Shortcuts
SAMP.ShowDialog(277, "{fff252}» {57377c}Shortcuts", 4@, "Select", "Back", 2)
else
if 2@ == 0
then
0AC6: 4@ = label @MainCMD offset
SAMP.ShowDialog(266, "{c8a5e7}» CivilCMD {ff0000}Jobs {00ff00}Prescurtari" , 4@, "Select" , "Exit", 2)
0B49: samp set_current_dialog_list_item -1
end
end
end
end
end
if 0B3C: samp is_dialog_responded id 255 button 2@ list_item 3@ input_text 0
then
if 2@ == 1
then
if 3@ == 0
then
0AC6: 4@ = label @JobList
SAMP.ShowDialog(256, "{ff0000}» {57377c}Jobs", 4@, "Menu", "Back", 2)
else
if 3@ == 1
then
0AC6: 4@ label @JobHelp
SAMP.ShowDialog(257, "{00ffff}» {57377c}Job Help", 4@, "Exit", "", 2)
else
if 2@ == 0
then
0AC6: 4@ = label @Jobs
SAMP.ShowDialog(255, "{fff252}» {57377c}Jobs", 4@, "Select", "Back", 2)
end
end
end
end
END
// Introduction
:CivilCMD
if SAMP.IsCommandTyped(0@)
0AC6: 17@ = label @CivilCMDText offset
SAMP.ShowDialog(7777, "» CivilCMD", 17@, "Close", "", 0)
SAMP.CmdRet
:CivilCMDText
HEX
43 69 76 69 6C 43 4D 44 20 74 65 20 61 6A 75 74 61 20 63 75 20
6F 72 69 63 65 20 70 65 20 62 75 67 67 65 64 2E 72 6F 21 20
54 6F 74 20 63 65 20 74 72 65 62 75 69 65 20 73 61 20 73 74
69 69 20 64 65 73 70 72 65 20 73 65 72 76 65 72 2E 20 4A 6F
62 73 20 26 20 73 68 6F 72 74 63 75 74 73 2E 0A 54 61 73 74
65 61 7A 61 20 2F 6D 61 69 6E 63 6D 64 20 70 65 6E 74 72 75
20 61 20 61 63 63 65 73 61 20 6D 61 69 20 6D 75 6C 74 65 20
64 65 74 61 6C 69 69 2E 00
END
// Main / Extract
:MainCMD
if SAMP.IsCommandTyped(0@)
0AC6: 4@ = label @ChoiceJS offset
SAMP.ShowDialog(266, "{c8a5e7}» CivilCMD {ff0000}Jobs {00ff00}Prescurtari" , 4@, "Select" , "Exit", 2)
SAMP.CmdRet()
:ChoiceJS
HEX
">> Jobs <<" A
">> Prescurtari <<" 0
END
:Jobs
HEX
">> Jobs <<" A // :JobList
">> (!) Ajutor (!) <<" 0 // :JobHelp
END
:JobList
HEX
"{ff0000}>> Citeste-ma! <<" A
">> Fisher" A
">> Arms Dealer" A
">> Detective" A
">> Mechanic" A
">> Car Jacker" A
">> Pizza Boy" A
">> Trucker" A
">> Bus Driver" A
">> Drug Dealer" A
">> Garbage Man" A
">> Farmer" A
">> Boat Transporter" 0
END
:JobHelp
HEX
"Cu ce ma ajuta selectarea unui job din lista anterioara?" A
"Ce se intampla daca selectez un job?" 0
END
:Shortcuts
HEX
">> Prescurtari <<" A // :ShortcutsList
">> (!) Ajutor (!) <<" 0 // :ShortcutsHelp
END