Jump to content
Sign in to follow this  
Gab

SannyBuilder ajutor

Recommended Posts

@shanker'

 

Salut, doresc sa fac un modulet simplu care sa dea repair si refill tuturor jucatorilor din jur pe un dolar

/repair id 1 si refill id 1

gen sa dea si repair si refill tuturor jucatorilor din zona printr-o singura comanda, mai exact sa dau /mec si sa dea si repair si refill tuturor din zona

Share this post


Link to post
Share on other sites

am facut asta dar nu merge

{$CLEO}

0000:

repeat
    wait 0
until 0AFA:

0B34: samp register_client_command "mec" to_label @mec

while true
    wait 0

    if [email protected] == 1
    then
        [email protected] = 0
        
        for [email protected] = 0 to 999
            if SAMP.IsPlayerConnected([email protected])
            then
                [email protected] = SAMP.GetActorHandleByPlayerID([email protected])
                if 056D:   actor [email protected] defined
                then
                    00A0: store_actor [email protected] position_to [email protected] [email protected] [email protected]
                    00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]
                    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
                    if not [email protected] > 15.0
                    then say "/repair %d 1" and "refill %d 1" [email protected]
                    end
                    wait 500
                end
            end
        end
    end
end

:mec
[email protected] = 1
0B43: samp cmd_ret

Share this post


Link to post
Share on other sites
Posted (edited)
{$CLEO}

0000:

repeat
    wait 0
until 0AFA:

0B34: samp register_client_command "mec" to_label @mec

while true
    wait 0

    if [email protected] == 1
    then
        [email protected] = 0
        
        for [email protected] = 0 to 999
            if SAMP.IsPlayerConnected([email protected])
            then
                [email protected] = SAMP.GetActorHandleByPlayerID([email protected])
                if 056D:   actor [email protected] defined
                then
                    00A0: store_actor [email protected] position_to [email protected] [email protected] [email protected]
                    00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]
                    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
                    if not [email protected] > 15.0
                    then 
                        say "/repair %d 1" [email protected]
                        wait 200
                        say "/refill %d 1" [email protected]
                    end
                    wait 1000
                end
            end
        end
    end
end

:mec
[email protected] = 1
0B43: samp cmd_ret

 

Edited by shanker'

Share this post


Link to post
Share on other sites

@shanker'

Are un delay cam mare, gen dau /mec si dureaza ceva ceva pana cand executa comenzile

Share this post


Link to post
Share on other sites
Posted (edited)

Îl poți modifica de unul singur.

Edited by shanker'

Share this post


Link to post
Share on other sites
Posted (edited)

Nu prea reusesc, am incercat ceva ceva, dar dupa ce dau /mec dureaza cam 10 secunde pana o ia din loc.

@shanker'

Edited by South GabYGaBuTzU

Share this post


Link to post
Share on other sites
Posted (edited)
18 minutes ago, South GabYGaBuTzU said:

Nu prea reusesc, am incercat ceva ceva, dar dupa ce dau /mec dureaza cam 10 secunde pana o ia din loc.

@shanker'

A, greșeala mea, scuze.

 

{$CLEO}

0000:

repeat
    wait 0
until 0AFA:

0B34: samp register_client_command "mec" to_label @mec

while true
    wait 0

    if [email protected] == 1
    then
        [email protected] = 0
        
        for [email protected] = 0 to 999
            if SAMP.IsPlayerConnected([email protected])
            then
                [email protected] = SAMP.GetActorHandleByPlayerID([email protected])
                if 056D:   actor [email protected] defined
                then
                    00A0: store_actor [email protected] position_to [email protected] [email protected] [email protected]
                    00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]
                    050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
                    if not [email protected] > 15.0
                    then 
                        say "/repair %d 1" [email protected]
                        wait 200
                        say "/refill %d 1" [email protected]
			wait 1000
                    end
                end
            end
        end
    end
end

:mec
[email protected] = 1
0B43: samp cmd_ret

 

Edited by shanker'

Share this post


Link to post
Share on other sites

@shanker'

Doamne ajuta, esti genial, multumesc mult.

Share this post


Link to post
Share on other sites

Nu ai pentru ce!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.