CLEO Help Dialog w/o SampFuncs

CLEO related
Status
Not open for further replies.

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Hey, I'm just looking to know if there is a way to show a SAMP dialog without having to install sampfuncs? thanks!
 

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Hey!, Thanks for the reply. I might use this as a last resort as I am looking to show a dialog just using standard Cleo without having to rely on SampFuncs.
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Code:
{$CLEO .cs}
0000:

CONST
SAMP_DIALOG_INFO_OFFSET = 0x212A40
SAMP_DIALOG_SHOW = 0x816F0
END

alloc 0@ = 24
alloc 1@ = 24
alloc 2@ = 60
format 0@ = "button1"
format 1@ = "button2"
format 2@ = "ThisIsACaption"
0AC6: 3@ = label @dText offset 




WHILE TRUE
    WAIT 0
    if 0AB0: 49
    THEN
        0AB1: @sDialog 4 button1 0@ button2 1@ caption 2@ text 3@ style 0
        wait 300
    END
END



:sDialog
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 1
    0A8E: 11@ = 10@ + SAMP_DIALOG_SHOW
    0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 0@ 1@ 2@ 3@ 4@ 0
END
0AB2: 0

:dText
hex
"textblablablatext" 00
end 

Simple example.

Code:
 //0AB1: @sDialog 4 button1 0@ button2 1@ caption 2@ text 3@ style 0
:sDialog
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 1
    0A8E: 11@ = 10@ + SAMP_DIALOG_SHOW
    0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 0@ 1@ 2@ 3@ 4@ 0
END
0AB2: 0
 
Status
Not open for further replies.
Top