Script owner

Status
Not open for further replies.

hacker127

Active member
Joined
Jul 17, 2019
Messages
44
Reaction score
2
Hi, I have written a few of my own scripts and I would like to add them to write to the chat every time you run GTA what is this script and who created it, please help with the code and write it best so I could just put it into the script. Thank you all for your effort.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,103
Solutions
5
Reaction score
882
Location
Lithuania
Hi, I have written a few of my own scripts and I would like to add them to write to the chat every time you run GTA what is this script and who created it, please help with the code and write it best so I could just put it into the script. Thank you all for your effort.
Which samp version you use
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,103
Solutions
5
Reaction score
882
Location
Lithuania
Example.:
PHP:
{$CLEO .cs}

0000:

wait 9000 //  wait until samp is ready

0AD1: "Script by Mister Black Dady"  TIME 2337

while true
wait 0

/// Your code

end
 

hacker127

Active member
Joined
Jul 17, 2019
Messages
44
Reaction score
2
Example.:
PHP:
{$CLEO .cs}

0000:

wait 9000 //  wait until samp is ready

0AD1: "Script by Mister Black Dady"  TIME 2337

while true
wait 0

/// Your code

end
Thank you, it works well. But I still want it to write to me in the chat.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,103
Solutions
5
Reaction score
882
Location
Lithuania
PHP:
{$CLEO .cs}

0000:

wait 10000 /// wait 10sec until samp is redy

0AC8: 0@ = allocate_memory_size 260
0AD3: 0@ = format "Hi say"
0AC8: 1@ = allocate_memory_size 260
0AD3: 1@ = format "Hi chatmsg"
0AC8: 2@ = allocate_memory_size 260
0AD3: 2@ = format "/pm 21 hello"


WHILE TRUE
    WAIT 0

if  
0ADC:   test_cheat "Z"
then  
    0AB1: @SAY 1 text 0@
end

if  
0ADC:   test_cheat "X"
then
    0AB1: @Chatmsg 2 text 1@ color 0xFF00FF00
end

if  
0ADC:   test_cheat "C"
then
    0AB1: @SEND_CMD 1 text 2@
end
  
END

:SAY
//0AB1: @SAY 1 $text
IF 0AA2: 1@ = "samp.dll"
THEN
    1@ += 0x5860 // FUNC_SAY_03DL
    0AA5: call 1@ num_param 1 pop 0 0@
END
0AB2: 0


:Chatmsg
//0AB1: @Chatmsg 2 $color $text
IF 0AA2: 2@ = "samp.dll"
THEN
    0085: 3@ = 2@
    3@ += 0x2ACA10 // SAMP_CHAT_INFO_OFFSET_03DL
    0A8D: 3@ = readMem 3@ sz 4 vp 1
    0085: 4@ = 2@
    4@ += 0x67650// FUNC_ADDTOCHATWND_03DL  
    0AA6: call 4@ struct 3@ num_params 5 pop 0 params 0 1@ 0 0@ 8
END
0AB2: 0

:SEND_CMD
//0AB1: @SEND_CMD 1 $text
IF 0AA2: 1@ = "samp.dll"
THEN
    1@ += 0x69340 // FUNC_SEND_CMD_03DL
    0AA5: call 1@ num_param 1 pop 0 0@
END
0AB2: 0
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,103
Solutions
5
Reaction score
882
Location
Lithuania
PHP:
{$CLEO .cs}

0000:

wait 10000 /// wait 10sec until samp is redy

0AC8: 0@ = allocate_memory_size 260
0AD3: 0@ = format "Script by Black Dady"
0AB1: @Chatmsg 2 text 0@ color 0xFF00FF00

WHILE TRUE
    WAIT 0
    
// Your code

end

:Chatmsg
//0AB1: @Chatmsg 2 $color $text
IF 0AA2: 2@ = "samp.dll"
THEN
    0085: 3@ = 2@
    3@ += 0x2ACA10 // SAMP_CHAT_INFO_OFFSET_03DL
    0A8D: 3@ = readMem 3@ sz 4 vp 1
    0085: 4@ = 2@
    4@ += 0x67650// FUNC_ADDTOCHATWND_03DL  
    0AA6: call 4@ struct 3@ num_params 5 pop 0 params 0 1@ 0 0@ 8
END
0AB2: 0
 

hacker127

Active member
Joined
Jul 17, 2019
Messages
44
Reaction score
2
Well, thank you very much it works exactly as I wanted. Just ask how I should do it to write one message in the chat more colors.
 
Status
Not open for further replies.
Top