i am a newbie so i need everyone's help on this. i currently don't know how to use it, roughly when the chat bar shows the text "[nameplayer] (id) dang o (player position)" then i will /ataxi (id). i really need help and i don't know if the code i gave can work or not, if it can't work please provide me a new code. thanks for the help
{$CLEO .cs} 0000: REPEAT WAIT 0 UNTIL 0AFA: SAMP_IS_READY 0B34: samp register_client_command "gontiendz" to_label @cmd_mycmd WHILE TRUE WAIT 0 IF AND 31@ = = TRUE 0B61: samp is_local_player_spawned THEN 0AC8: 0@ = allocate_memory_size 1024 0AC8: 1@ = allocate_memory_size 1024 0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@ IF 0C29: 4@ = stristr string1 0@ string2 "/ataxi " THEN 0AC8: 5@ = allocate_memory_size 1024 0AB1: @DeleteColorCodeFromText 2 text 4@ memory_to_store_characters_as_text 5@ 0AC8: 6@ = allocate_memory_size 260 0AB1: @get_digits_to_print param_count 2 text 5@ memory_to_store_digits_as_text 6@ IF 30@ == FALSE THEN 30@ = TRUE SAY "/ataxi %d" 6@ 32@ = 0 END IF 30@ == TRUE THEN IF 32@ >= 2000 // 2 sec delay THEN 30@ = FALSE END END END END END :CMD IF 31@ == FALSE THEN 31@ = TRUE 0AD1: "~A~Auto Accept ~G~ON" ELSE 31@ = FALSE 0AD1: "~A~Auto Accept ~R~OFF" END 0B43: samp cmd_ret { 0AC8: 1@ = allocate_memory_size 1024 0AB1: @DeleteColorCodeFromText 2 text 0@ memory_to_store_characters_as_text 1@ } 5@ = FALSE // inbracket 0C17: 31@ = strlen 0@ FOR 30@ = 0 TO 31@ 0085: 29@ = 0@ // copy pointer 005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character) 0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character IF 28@ == 123 THEN 5@ = TRUE // inbracket END IF 5@ == FALSE // inbracket THEN 0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1 1@ += 1 // move to next address END IF 28@ == 125 THEN 5@ = FALSE // inbracket END END 0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination 0AB2: ret 0 :get_digits_to_print { 0@ = text 1@ = pointer to memory where digits will be stored as text } 0C17: 31@ = strlen 0@ FOR 30@ = 0 TO 31@ 0085: 29@ = 0@ // copy pointer 005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character) 0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character IF AND 28@ >= 0x30 // '0' 28@ <= 0x39 // '9' THEN 0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1 1@ += 1 // move to next address END END 0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination 0AB2: ret 0 |