CLEO | Incompatibile labael

Статус
В этой теме нельзя размещать новые ответы.

Kristyan

Известный
Автор темы
165
16
Hi, i have this label which is not compatible with SAMPFUNCS 5.3+, is only works with SAMPFUNCS 5.2.2. What is not working: is the command [/mdcc] (scans the radius for wanted players, if that text says he found a player) and displaying colored text what that he found a player with wanted.
PHP:
:copcmd_main
WAIT 0
    IF 31@ == 1
    THEN
        FOR 0@ = 0 to 999
            IF SAMP.IsPlayerConnected(0@)
            THEN
                IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
                THEN
                    16@ = SAMP.GetPlayerColor(0@)
                    IF 16@ == COLOR
                    THEN
                    0AF9: samp say_msg "/mdc %d" 0@
                    WAIT 1000
                    13@ += 1
                    END
                END
            END
        END
        IF 14@ == 0
        then
        wait 0
        else
        chatmsg "[CopCMD]: {FF8000}Have found %d players with wanted." -1 13@
        13@ = 0
        end
        31@ = 0
    END
FOR 22@ = 0 to 999
    IF SAMP.IsPlayerConnected(22@)
    THEN
        IF 1@ = SAMP.GetActorHandleByPlayerID(22@)
        THEN
            16@ = SAMP.GetPlayerColor(22@)
            IF 16@ == COLOR
            THEN
            23@ += 1
            END
        END
    END
END
if 4@ == 1
then
    if 23@ == 0
    then
    03F0: enable_text_draw 1
    format 24@ "Wanted Players: %d" 23@
    0AA8: call_function_method 6946896 struct 12694336 num_params 1 pop 0 'CRED002' 17@
    0AA5: call 7439872 num_params 2 pop 2 17@ 24@
    033F: set_text_draw_letter_size 0.33 1.2
    081C: draw_text_outline 1 RGBA 0 0 0 255
    0340: set_text_draw_RGBA 255 255 255 255
    0349: set_text_draw_font 1
    03E4: set_text_draw_align_right 1
    033E: set_draw_text_position 375.0 430.0 GXT 'CRED002'
    23@ = 0
    else
    03F0: enable_text_draw 1
    format 24@ "Wanted Players: %d" 23@
    0AA8: call_function_method 6946896 struct 12694336 num_params 1 pop 0 'CRED002' 17@
    0AA5: call 7439872 num_params 2 pop 2 17@ 24@
    033F: set_text_draw_letter_size 0.33 1.2
    081C: draw_text_outline 1 RGBA 0 0 0 255
    0340: set_text_draw_RGBA 227 51 109 255
    0349: set_text_draw_font 1
    03E4: set_text_draw_align_right 1
    033E: set_draw_text_position 375.0 430.0 GXT 'CRED002'
    23@ = 0
    end  
end

if key_down 109
then
    if 0B21:     samp is_chat_opened
    then
    jump @copcmd_main
    else
        if 8@ == 0
        then
        8@ = 1
        0AF9: samp say_msg "/so %s" 5@
        end
    end
else
    if 8@ == 2
    then
    0000:
    else
    8@ = 0
    end
end



if key_down 113
then
    if 8@ == 0
    then
    8@ = 2
    jump @cmd_repref
    end
else
    if 8@ == 1
    then
    0000:
    else
    8@ = 0
    end
end

if 0B21:     samp is_chat_opened
then
jump @copcmd_main
else
    if key_down 71
    then
    01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
    end
end
jump @copcmd_main



:mdcc_1
14@ = 1
0@ = -1 
0B12: 31@ = 31@ XOR 1
SAMP.CmdRet

:cmd_117 
0B12: 4@ = 4@ XOR 1
if 4@ == 0
then
chatmsg "[CopCMD]: {FF8000}Wanted info is now OFF." -1
0AF1: write_int 0 to_ini_file "cleo\copcmd.ini" section "Activation" key "state"
else
chatmsg "[CopCMD]: {FF8000}Wanted info is now ON." -1
0AF1: write_int 1 to_ini_file "cleo\copcmd.ini" section "Activation" key "state"
end
SAMP.CmdRet

Can someone answer me which opcode maybe is not compatible, or maybe is from INI file.. idk pls help
Thanks for reading.
 
Последнее редактирование:

Kristyan

Известный
Автор темы
165
16
This code isnt full, i cant see label "cmd_repref", but i see jump
also, can you tell what contains COLOR?
cmd_repref
PHP:
:cmd_repref
0007: 12@ = 10.0
11@ = -1
Actor.StorePos($PLAYER_ACTOR, 27@, 26@, 25@)
FOR 0@ = 0 to 999
    IF SAMP.IsPlayerConnected(0@)
    THEN
        IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
        THEN
            IF Actor.Driving(1@)
            THEN
                2@ = Actor.CurrentCar(1@)
                046C: 20@ = car 2@ driver
                IF 003B: 20@ == 1@
                THEN
                    Actor.StorePos(1@, 30@, 29@, 28@)
                    050A: 16@ = distance_between_XYZ 27@ 26@ 25@ and_XYZ 30@ 29@ 28@
                    IF 0025: 16@ > 12@
                    THEN
                        16@ = 0
                    ELSE
                        0087: 12@ = 16@
                        0085: 11@ = 0@
                    END
                END
            END
        END
    END
END
IF 0039: 11@ == -1
THEN
    0085: 1@ = 1@
ELSE
    0AF9: samp say_msg "/repair %d 1" 11@
END
11@ = -1
Actor.StorePos($PLAYER_ACTOR, 27@, 26@, 25@)
FOR 0@ = 0 to 999
    IF SAMP.IsPlayerConnected(0@)
    THEN
        IF 1@ = SAMP.GetActorHandleByPlayerID(0@)
        THEN
            IF Actor.Driving(1@)
            THEN
                2@ = Actor.CurrentCar(1@)
                046C: 20@ = car 2@ driver
                IF 003B: 20@ == 1@
                THEN
                    Actor.StorePos(1@, 30@, 29@, 28@)
                    050A: 16@ = distance_between_XYZ 27@ 26@ 25@ and_XYZ 30@ 29@ 28@
                    IF 0025: 16@ > 12@
                    THEN
                        16@ = 0
                    ELSE
                        0087: 12@ = 16@
                        0085: 11@ = 0@
                    END
                END
            END
        END
    END
END
IF 0039: 11@ == -1
THEN
    0085: 1@ = 1@
ELSE
    0AF9: samp say_msg "/refill %d 1" 11@
END
jump @copcmd_main
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.