Jump to content
Hostul a fost schimbat. Daca vedeti serverul offline readaugati rpg.b-zone.ro sau 141.95.124.78:7777 in clientul de sa-mp ×

[CLEO] Crearea unei bucle pentru toti jucătorii


Andreigl
 Share

Recommended Posts

High Code:

for 0@ = 0 to 999 step 1
    if SAMP.IsPlayerConnected(1@)
    then
	// some code
    end
end

Low Code:

0@ = 0 

:Noname_7
if 
   SAMP.IsPlayerConnected(1@)
jf @Noname_23 

:Noname_23
0@ += 1 
  0@ > 999 
jf @Noname_7 

 

Pentru ce este de folos? Ei bine, voi știți, dar vă spun ce-mi trece prin cap acum:

  1. Crearea unui mod ce vinde / oferă arme / repair / refill tuturor jucătorilor de lângă tine
  2. Crearea unui mod ce dă find pe un jucător online (detective help job skill up sau ceva de genul)

 

Pentru prima variantă, o să trebuiască să verificăm dacă jucătorul este în stream zone (luăm handle-ul), după verificăm distanța dintre cele 2 caractere (eu și el).

Exemplu:

for 0@ = 0 to 999 step 1
    if SAMP.IsPlayerConnected(0@)
    then
        1@ = SAMP.GetActorHandleByPlayerID(0@)
        if 056D:   actor 1@ defined
        then
            Actor.StorePos(1@, 2@, 3@, 4@)
            Actor.StorePos($PLAYER_ACTOR, 5@, 6@, 7@)
            050A: 8@ = distance_between_XYZ 2@ 3@ 4@ and_XYZ 5@ 6@ 7@
            if not 8@ >= 15.0 // feet
            then
                // some code
            end
        end
    end
end

 

 

Link to comment
Share on other sites

14 minutes ago, shanker' said:

Crearea unui mod ce vinde / oferă arme / repair / refill tuturor jucătorilor de lângă tine

Este ilegal, conform lui @Kelton

Se pot afla jucatori cu namecover (al caror nume nu il vezi) langa tine, iar tu daca dai arme la tot serverul o sa le dai si acelor jucatori, astfel stiind cine sunt.

Link to comment
Share on other sites

6 hours ago, Madalin said:

Poţi să le vinzi şi uitându-te pe website si luând numele la fiecare în parte.. Mai fă tutoriale d-ăstea în Sanny Builder că-s faine :D

E complicat așa :)) N-are rost

Link to comment
Share on other sites

Foarte fain :)) poate ii vine cuiva o idee bomba sa faca un mod bazat pe codul sursa de aici si sa nu fie ilegal, idk, poate un mod de event-uri sau un mod pentru admini/helperi. We'll see.

On 2/23/2017 at 2:17 AM, Leventhe said:

6. Topicurile în care nu s-a postat de mai mult de 3 zile vor fi închise.

:topic_closed:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

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.