Nic Posted December 15, 2019 Share Posted December 15, 2019 @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 More sharing options...
Andreigl Posted December 15, 2019 Share Posted December 15, 2019 :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: Și pentru restu: Link to comment Share on other sites More sharing options...
Nic Posted December 15, 2019 Author Share Posted December 15, 2019 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: Și pentru restu: ms esti cel mai tare Link to comment Share on other sites More sharing options...
SirDaniel Posted December 16, 2019 Share Posted December 16, 2019 Topic închis. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.