- 3
- 0
- Версия SA-MP
-
- 0.3.7-R2
Hey, I have some code for auto feeding pets and it won't work, any ideas why?
Code:
pet.ini file
Code:
The dialogs on the current server example:
When the pet has 20 HP it will say in chat a message that you will need to feed him before dying, now there is no strings for this, meaning that for every payday after you reach 20 hp it will say the same message and this is "Pet-ul tau are sub 20HP! Hraneste-l cat mai curand pentru a evita disparitia acestuia!"
So when that text is in chat I want to do the following dialogs.
Code:
Код:
{$USE CLEO}
{$USE ini}
{$USE file}
{$USE newOpcodes}
{$USE bitwise}
{$USE clipboard}
{$USE CLEO+}
{$CLEO .cs}
0000: "Hello world"
REPEAT
WAIT 0
UNTIL 0AFA:
WHILE TRUE
WAIT 0
IF AND
31@ == FALSE
0B61: samp is_local_player_spawned
THEN
0B75: samp get_chat_string 99 text_to 0@ prefix_to 1@ color_to 2@ prefix_color_to 3@
IF 0C29: $NOT_UED = stristr string1 0@ string2 "Pet- ul tau are sub"
THEN
IF 0AD4: $NOT_UED = scan_string 4@ format "%dHP!" 5@
THEN
0209: 6@ = random_int_in_ranges 1000 2000
wait 6@
say "/pet"
0AF0: 22@ = get_int_from_ini_file "CLEO\pet.ini" section "pet" key "pet"
wait 100
0B49: samp set_current_dialog_list_item 22@
wait 50
0B49: samp set_current_dialog_list_item 22@
wait 50
0B47: samp close_current_dialog_with_button 1
wait 100
0B49: samp set_current_dialog_list_item 9
wait 50
0B49: samp set_current_dialog_list_item 9
wait 50
0B47: samp set_current_dialog_list_item 1
wait 100
0B49: samp set_current_dialog_list_item 1
wait 50
0B49: samp set_current_dialog_list_item 1
wait 50
0B47: samp close_current_dialog_with_button 1
END
END
END
END
pet.ini file
Code:
Код:
[pet]
pet=0
The dialogs on the current server example:
When the pet has 20 HP it will say in chat a message that you will need to feed him before dying, now there is no strings for this, meaning that for every payday after you reach 20 hp it will say the same message and this is "Pet-ul tau are sub 20HP! Hraneste-l cat mai curand pentru a evita disparitia acestuia!"
So when that text is in chat I want to do the following dialogs.