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 ×

Ajutor Sanny Builder


Nic

Recommended Posts

@shanker'
:fstart
SAMP.IsCommandTyped(1@)
0AD4: 0@ = scan_string 1@ format "%s %s %s %s %s" 2@v 6@v 10@v 14@v 18@v
if 0@ == 1
then
say "/f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %d!" 2@v
say "/f Cei ce doresc sa posteze un anunt o pot face prin [/sms %s]." 2@v
else
if 0@ == 2
then
say "/f Anunturile gratuite au inceput, [/sms %s], [/sms %s]." 2@v 6@v
else
if 0@ == 3
then
say "/f Anunturile gratuite au inceput, [/sms %s], [/sms %s], [/sms %s]." 2@v 6@v 10@v
else
if 0@ == 4
then
say "/f Anunturile gratuite au inceput, [/sms %s], [/sms %s], [/sms %s], [/sms %s]." 2@v 6@v 10@v 14@v
else
chatmsg "{bfff00}[NR Helper] {ffffff}Syntax: [/startf <id1> <id2> <id3> <id4>]" -1
chatmsg "{bfff00}[NR Helper] {ffffff}ID-ul se pune in functie de cati reporteri participa la A.G.-uri" -1
end
end
end
end
0B43: samp cmd_ret

 

La gazda dumneavoastra sa scrie numele nu id. Ar trebui sa arate asa cand dai /fstart 69

 

/f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra AlaCuId69!
/f Cei ce doresc sa posteze un anunt o pot face prin [/sms 69].

Link to comment
Share on other sites

:FStart
SAMP.IsCommandTyped(0@)

/* 
    O sesiune de anunturi poate sa aiba pana la 4 reporteri, cu gazda cu tot
    Consideram ca gazda va fi cel care da primul news, adica persoana care apeleaza functia aceasta
    Deci o sa avem nevoie doar de 3 parametrii introdusi si anume ID ul celor care participa in sesiunea de anunturi, excluzand gazda
*/
0AD4: 1@ = scan_string 0@ format "%d %d %d" 3@ 4@ 5@ 

if or   
    1@ == 0
    1@ == -1
then
    0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
    6@ = SAMP.GetPlayerNickname(2@)   
    say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
    say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d]." 2@
    
    /*
      Apelam functia in felul urmator: /FStart
      In joc o sa vedem chatul in felul urmator:
      
            /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra Shanker
            /f Cei ce doresc sa posteze un anunt o pot face prin [/sms 100].
      
      Am presupus ca numele meu este Shanker si am ID 100.
    */
end

/* Gazda + 1 reporter */
if 1@ == 1
then
    if SAMP.IsPlayerConnected(3@)
    then
        0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
        6@ = SAMP.GetPlayerNickname(2@)
        say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
        say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d], [/sms %d]." 2@ 3@
    else chatmsg "1 sau mai multi jucatori nu sunt conectati." -1
    end
end

if 1@ == 2
then
    if and
        SAMP.IsPlayerConnected(3@)
        SAMP.IsPlayerConnected(4@)
    then
        0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
        6@ = SAMP.GetPlayerNickname(2@)
        say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
        say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d], [/sms %d], [/sms %d]" 2@ 3@ 4@
    else chatmsg "1 sau mai multi jucatori nu sunt conectati." -1
    end
end

if 1@ == 3
then
    if and
        SAMP.IsPlayerConnected(3@)
        SAMP.IsPlayerConnected(4@)
        SAMP.IsPlayerConnected(5@)
    then
        0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
        6@ = SAMP.GetPlayerNickname(2@)
        say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
        say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d], [/sms %d], [/sms %d], [/sms %d]" 2@ 3@ 4@ 5@
    else chatmsg "1 sau mai multi jucatori nu sunt conectati." -1
    end
end

0B43: samp cmd_ret

 

Apelarea funcției cu 0 parametri trimiși arată în felul următor:

image.png.d53b338041f44acaf2883aba2324c3bf.png

 

Și pentru restu:

image.png.b2b177ee0907ceaf5fcceaa46b9de9a0.pngimage.png.224100245281e1d3ccedeb7c0758a6c6.pngimage.png.9db0024ab5e021c28119bdc26b9442e8.png

Link to comment
Share on other sites

52 minutes ago, shanker' said:

:FStart
SAMP.IsCommandTyped(0@)

/* 
    O sesiune de anunturi poate sa aiba pana la 4 reporteri, cu gazda cu tot
    Consideram ca gazda va fi cel care da primul news, adica persoana care apeleaza functia aceasta
    Deci o sa avem nevoie doar de 3 parametrii introdusi si anume ID ul celor care participa in sesiunea de anunturi, excluzand gazda
*/
0AD4: 1@ = scan_string 0@ format "%d %d %d" 3@ 4@ 5@ 

if or   
    1@ == 0
    1@ == -1
then
    0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
    6@ = SAMP.GetPlayerNickname(2@)   
    say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
    say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d]." 2@
    
    /*
      Apelam functia in felul urmator: /FStart
      In joc o sa vedem chatul in felul urmator:
      
            /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra Shanker
            /f Cei ce doresc sa posteze un anunt o pot face prin [/sms 100].
      
      Am presupus ca numele meu este Shanker si am ID 100.
    */
end

/* Gazda + 1 reporter */
if 1@ == 1
then
    if SAMP.IsPlayerConnected(3@)
    then
        0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
        6@ = SAMP.GetPlayerNickname(2@)
        say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
        say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d], [/sms %d]." 2@ 3@
    else chatmsg "1 sau mai multi jucatori nu sunt conectati." -1
    end
end

if 1@ == 2
then
    if and
        SAMP.IsPlayerConnected(3@)
        SAMP.IsPlayerConnected(4@)
    then
        0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
        6@ = SAMP.GetPlayerNickname(2@)
        say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
        say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d], [/sms %d], [/sms %d]" 2@ 3@ 4@
    else chatmsg "1 sau mai multi jucatori nu sunt conectati." -1
    end
end

if 1@ == 3
then
    if and
        SAMP.IsPlayerConnected(3@)
        SAMP.IsPlayerConnected(4@)
        SAMP.IsPlayerConnected(5@)
    then
        0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
        6@ = SAMP.GetPlayerNickname(2@)
        say " /f Salut tuturor! Au inceput anunturile gratuite alaturi de gazda dumneavoastra %s!" 6@
        say " /f Cei ce doresc sa posteze un anunt o pot face prin [/sms %d], [/sms %d], [/sms %d], [/sms %d]" 2@ 3@ 4@ 5@
    else chatmsg "1 sau mai multi jucatori nu sunt conectati." -1
    end
end

0B43: samp cmd_ret

 

Apelarea funcției cu 0 parametri trimiși arată în felul următor:

image.png.d53b338041f44acaf2883aba2324c3bf.png

 

Și pentru restu:

image.png.b2b177ee0907ceaf5fcceaa46b9de9a0.pngimage.png.224100245281e1d3ccedeb7c0758a6c6.pngimage.png.9db0024ab5e021c28119bdc26b9442e8.png

ms esti cel mai tare

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • 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.