KamikazeSripterul
Well-known member
- Joined
- Jun 30, 2019
- Messages
- 353
- Reaction score
- 23
So i tried to make a confirmation system but it doesn't work...
So this is how it works. Once you type either /quitgroup or /quitclan, you will be displayed a dialog to ensure you want to quit the clan / group. After that, it will ask again in chat for key confirmation, so you have to press either Y which will type /quit<group/clan> or N which will say 'We are happy for you to remain with us.'. The key confirmation system doesn't work and i'm not sure how or what to do.. Any helping tips? Thanks in advance.
So this is how it works. Once you type either /quitgroup or /quitclan, you will be displayed a dialog to ensure you want to quit the clan / group. After that, it will ask again in chat for key confirmation, so you have to press either Y which will type /quit<group/clan> or N which will say 'We are happy for you to remain with us.'. The key confirmation system doesn't work and i'm not sure how or what to do.. Any helping tips? Thanks in advance.
Code:
{$CLEO}
{$INCLUDE SF}
0000:
thread "AttentionCMD"
repeat
wait 0
until SAMP.Available()
chatmsg "{cecece}[AtentionCMD]: {ff2200}By Kristler for bugged.ro" -1
chatmsg "{cecece}[AtentionCMD]: {ff2200}ON at all times to save lives" -1
0B34: "quitclan" @quitclan
0B34: "quitgroup" @quitgroup
WHILE TRUE
WAIT 0
IF SAMP.DialogRespond(1000, 1@, 0 ,0)
THEN
IF 1@ == 1
THEN
chatmsg "{cecece}[AtentionCMD]: {ffffff}Are you sure you wish to leave your {ff0000}clan{ffffff}?" -1
chatmsg "{cecece}[AtentionCMD]: {00ff00}Y{ffffff}/{ff0000}N" -1
IF key_down 89
THEN
REPEAT
WAIT 0
UNTIL NOT key_down 89
say "/quitclan"
wait 150
0B47: samp close_current_dialog_with_button 1
ELSE
IF key_down 78
THEN
REPEAT
WAIT 0
UNTIL NOT key_down 78
chatmsg "{cecece}[AtentionCMD]: {ffffff}We are happy for you to remain with us." -1
END
END
ELSE
2@ = 0
END
END
IF SAMP.DialogRespond(2000, 1@, 0 ,0)
THEN
IF 1@ == 1
THEN
chatmsg "{cecece}[AtentionCMD]: {ffffff}Are you sure you wish to leave your {00ff00}faction{ffffff}?" -1
chatmsg "{cecece}[AtentionCMD]: {00ff00}Y{ffffff}/{ff0000}N" -1
IF AND
2@ == 1
key_down 89
THEN
REPEAT
WAIT 0
UNTIL NOT key_down 89
say "/quitgroup"
wait 150
0B47: samp close_current_dialog_with_button 1
2@ = 0
ELSE
IF AND
2@ == 1
key_down 78
THEN
REPEAT
WAIT 0
UNTIL NOT key_down 78
chatmsg "{cecece}[AtentionCMD]: {ffffff}We are happy for you to remain with us." -1
2@ = 0
END
END
ELSE
2@ = 0
END
END
END
:quitclan
SAMP.IsCommandTyped(20@)
2@ = 1
SAMP.ShowDialog(1000, "Are you sure?" "Do you want to quit the {ff0000}clan{ffffff}?", "Yes", "No", 0)
SAMP.CmdRet()
:quitgroup
SAMP.IsCommandTyped(20@)
2@ = 1
SAMP.ShowDialog(2000, "/quitfaction", "Are you sure you want to quit your {ff00ff}faction{ffffff}?", "Yes", "No", 0)
SAMP.CmdRet()