B1-g list? Not sure what you mean but I hope you know that strings have max. size / chat.Hello everybody!
I want to make a cleo that sends one message on chat from a big list, with only one command.
Can someone explain me how to do it?
i mean in this cleo is a list with messages and when i type a command automatically sends one message from that list.B1-g list? Not sure what you mean but I hope you know that strings have max. size / chat.
Idk how to make a list that "extract a message" from it.show cleo / list
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
0@ = 0
WHILE TRUE
WAIT 0
IF
0AB0: 88
THEN
REPEAT
WAIT 0
UNTIL 8AB0: 88
0@++ // increase by 1;
IF 0@ > 3 // ID 3 IS MAX
THEN
0@ = 0
END
0AB1: call @readStringFromList 2 list @ChatStrings string_number 0@ to 1@
0AC8: 2@ = allocate_memory_size 260
0AD3: 2@ = format "%s" 1@
0AF9: samp say_msg "ID: %d, TEXT: %s" 0@ 2@
0AC9: free_allocated_memory 2@
END
END
:ChatStrings
0900: "I bet your boyfriend doesnt even kiss ya" // ID 0
0900: "Hit or Miss" // ID 1
0900: "I guess they never miss huh" // ID 2
0900: "He gonn find another girl and he wont miss ya" // ID 3
0000:
:readStringFromList
var
1@ : int
2@ : int
end
0AC6: 0@ = label 0@ offset
0@ += 4
2@ = 0
while 2@ < 1@
3@ = 1
while 3@ <> 0
0A8D: 3@ = read_memory 0@ size 1 virtual_protect 0
inc(0@)
end
0@ += 3
inc(2@)
end
ret 1 0@
and how i should activate it?You want something like dis:
Code:{$CLEO .cs} 0000: REPEAT WAIT 0 UNTIL 0AFA: SAMP_IS_READY 0@ = 0 WHILE TRUE WAIT 0 IF 0AB0: 88 THEN REPEAT WAIT 0 UNTIL 8AB0: 88 0@++ // increase by 1; IF 0@ > 3 // ID 3 IS MAX THEN 0@ = 0 END 0AB1: call @readStringFromList 2 list @ChatStrings string_number 0@ to 1@ 0AC8: 2@ = allocate_memory_size 260 0AD3: 2@ = format "%s" 1@ 0AF9: samp say_msg "ID: %d, TEXT: %s" 0@ 2@ 0AC9: free_allocated_memory 2@ END END :ChatStrings 0900: "I bet your boyfriend doesnt even kiss ya" // ID 0 0900: "Hit or Miss" // ID 1 0900: "I guess they never miss huh" // ID 2 0900: "He gonn find another girl and he wont miss ya" // ID 3 0000: :readStringFromList var 1@ : int 2@ : int end 0AC6: 0@ = label 0@ offset 0@ += 4 2@ = 0 while 2@ < 1@ 3@ = 1 while 3@ <> 0 0A8D: 3@ = read_memory 0@ size 1 virtual_protect 0 inc(0@) end 0@ += 3 inc(2@) end ret 1 0@
In the chat, it says: "ID: D, TEXT: S".You want something like dis:
Code:{$CLEO .cs} 0000: REPEAT WAIT 0 UNTIL 0AFA: SAMP_IS_READY 0@ = 0 WHILE TRUE WAIT 0 IF 0AB0: 88 THEN REPEAT WAIT 0 UNTIL 8AB0: 88 0@++ // increase by 1; IF 0@ > 3 // ID 3 IS MAX THEN 0@ = 0 END 0AB1: call @readStringFromList 2 list @ChatStrings string_number 0@ to 1@ 0AC8: 2@ = allocate_memory_size 260 0AD3: 2@ = format "%s" 1@ 0AF9: samp say_msg "ID: %d, TEXT: %s" 0@ 2@ 0AC9: free_allocated_memory 2@ END END :ChatStrings 0900: "I bet your boyfriend doesnt even kiss ya" // ID 0 0900: "Hit or Miss" // ID 1 0900: "I guess they never miss huh" // ID 2 0900: "He gonn find another girl and he wont miss ya" // ID 3 0000: :readStringFromList var 1@ : int 2@ : int end 0AC6: 0@ = label 0@ offset 0@ += 4 2@ = 0 while 2@ < 1@ 3@ = 1 while 3@ <> 0 0A8D: 3@ = read_memory 0@ size 1 virtual_protect 0 inc(0@) end 0@ += 3 inc(2@) end ret 1 0@