Squiz TTC Posted January 26, 2022 Share Posted January 26, 2022 Salutare vreau sa fac o comanda, cand tastez comanda /repair sa imi scaneze automat jucatorii din zona pe o raza decent de mica (asa permite si serverul) si sa le ofere tuturor /repair si doar sa accepte. suma este setata direc din comanda. Mai apoi pot continua si cu /refill si /refillgascan. Doar ca am nevoie putin ajutor. Multumesc! Comanda o am simplificata eu doar adaug /rrf <id> si ii da jucatorului toate 3 comenzi simultan. As vrea sa simplific sa nu mai scriu si id-ul. :cmd_rrf SAMP.IsCommandTyped(20@) if 0AD4: 20@ = scan_string 20@ format "%d" 21@ then 0AF9: samp say_msg "/refill %d 50" 21@ 0AF9: samp say_msg "/repair %d 50" 21@ 0AF9: samp say_msg "/refillgascan %d 20" 21@ else chatmsg "{FADD6B}Sintaxa: [/rrf <id>]." 2000 end SAMP.CmdRet() Link to comment Share on other sites More sharing options...
Squiz TTC Posted January 27, 2022 Author Share Posted January 27, 2022 Am aceasta comanda gasita si modificata.. dar compileaza problema este ca in game nu recunoastea comanda da eroare comanda necunoscuta 0B34: samp register_client_command "rra" to_label @cmd_rra WHILE TRUE wait 0 if 0@ == 1 then 0@ = 0 for 1@ = 0 to 999 if SAMP.IsPlayerConnected(1@) then 2@ = SAMP.GetActorHandleByPlayerID(1@) 10@ = SAMP.GetPlayerColor(1@) if 056D: actor 2@ defined then 00A0: store_actor 2@ position_to 3@ 4@ 5@ 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@ 050A: 9@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 6@ 7@ 8@ if not 9@ > 15.0 then if or not 10@ == 0xAA3333 not 10@ == 0xAA3333FF then say "/repair %d 50" 1@ say "/refill %d 50" 1@ say "/refillgascan %d 20" 1@ wait 200 end end end end end END :cmd_rra 0B12: 0@ = 0@ XOR 1 cmdret Link to comment Share on other sites More sharing options...
Tupi Posted January 28, 2022 Share Posted January 28, 2022 Scriptul din loop in sine pare a fi in regula la o prima vedere, cu mici lipsuri care tin de verificari. Daca iti spune comanda nerecunoscuta dar celelalte comenzi din mod functioneaza incearca ca inainte de inregistrarea comenzii sa adaugi o anulare a inregistratii deoarece si eu am patit la un moment dat aceiasi problema la o anumita comanda. 0B63: samp unregister_client_command "rra" 0B34: samp register_client_command "rra" to_label @cmd_rra Asigurate ca anularea inregistratii este inainte de inregistrare si nu dupa deoarece daca intai o inregistrezi si dupa o anulezi nu ai rezolvat nimic. PS: O corectare a scriptului/completare gasesti in raspunsul meu din PM-ul trimis. 1 Link to comment Share on other sites More sharing options...
Nic Posted January 31, 2022 Share Posted January 31, 2022 salut! mai ai nevoie de ajutor? Link to comment Share on other sites More sharing options...
Squiz TTC Posted January 31, 2022 Author Share Posted January 31, 2022 (edited) 3 hours ago, Nic said: salut! mai ai nevoie de ajutor? Da, poate nu am ceva add ons? m-a ajutat Tupi dar tot nu ii dau de capat... compileaza doar daca pun $USE Cleo+ .. dar nu recunoaste comanda in joc. {$CLEO .cs} {$USE CLEO} //{$USE CLEO+} (Daca inchid linia da eroarea de jos) daca o las dechisa compileaza dar nu recunoaste comanda in joc. *Opcode 0B20 is not found in the standard opcodes and current script extensions. Add directive {$USE <extension_name>} at the top of the script. List of available extensions: default, CLEO+, CLEO, newOpcodes, bitwise, file, ini.* {$CLEO} 0B34: samp register_client_command "fvrr" to_label @cmd_fvrr :cmd_39 //------------------------------linie pentru /fvr automat in 10 secunde cu mesaj----------------------(functional) wait 0 if $fvrr == 1 then wait 10000 say "/fvr" $fvrr = 0 end //------------------------------linie pentru repair & refill sa caute automat jucatorul in zona ---------------- if 0@ == 1 then for 1@ = 0 to 999 if SAMP.IsPlayerConnected(1@) then 2@ = SAMP.GetActorHandleByPlayerID(1@) 11@ = SAMP.GetPlayerColor(1@) if 056D: 2@ then 00A0: store_actor 2@ position_to 3@ 4@ 5@ 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@ 050A: 9@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 6@ 7@ 8@ if and Actor.Driving(2@) not 9@ > 10.0 not 11@ == 0xFFAA3333 //<---- Exclus hitman cu sau fara undercover activ then if or 11@ == 0xFFD7CE96 //<----- Coleg TTC 11@ == 0xD7CE96 //<------ -//- then say "/repair %d 1" 1@ say "/refill %d 1" 1@ say "/refillgascan %d 1" 1@ else say "/repair %d 50" 1@ say "/refill %d 50" 1@ say "/refillgascan %d 20" 1@ end wait 1000 end end end end 0@ = 0 end //END jump @cmd_39 // ---------------[comanda /rra]--------------------------- :cmd_rra if 0@ == 0 then 0@ = 1 else 0@ = 0 end SAMP.CmdRet Edited January 31, 2022 by Squiz TTC Link to comment Share on other sites More sharing options...
Nic Posted February 1, 2022 Share Posted February 1, 2022 Eu nu inteleg ce comanda vrei sa ti recunoasca in joc daca tu ai dat register doar la 0B34: samp register_client_command "fvrr" to_label @cmd_fvrr comanda /fvrr, care in modu tau nu exista nicaieri?? {$CLEO} {$USE CLEO+} 0000: NOP repeat wait 50 until 0AFA: is_samp_structures_available 0b34: "rra" @rra 0b34: "fvrr" @fvrr 15@ = 0 0@ = 0 while true wait 0 //------------------------------linie pentru /fvr automat in 10 secunde cu mesaj----------------------(functional) wait 0 if 15@ == 1 then wait 10000 say "/fvr" 15@ = 0 end //------------------------------linie pentru repair & refill sa caute automat jucatorul in zona ---------------- if 0@ == 1 then for 1@ = 0 to 999 if SAMP.IsPlayerConnected(1@) then 2@ = SAMP.GetActorHandleByPlayerID(1@) 11@ = SAMP.GetPlayerColor(1@) if 056D: 2@ then 00A0: store_actor 2@ position_to 3@ 4@ 5@ 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@ 050A: 9@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 6@ 7@ 8@ if and Actor.Driving(2@) not 9@ > 10.0 not 11@ == 0xFFAA3333 //<---- Exclus hitman cu sau fara undercover activ then if or 11@ == 0xFFD7CE96 //<----- Coleg TTC 11@ == 0xD7CE96 //<------ -//- then say "/repair %d 1" 1@ say "/refill %d 1" 1@ wait 2000 say "/refillgascan %d 1" 1@ else say "/repair %d 50" 1@ say "/refill %d 50" 1@ wait 2000 say "/refillgascan %d 20" 1@ end wait 1000 end end end end 0@ = 0 end end // ---------------[comanda /rra]--------------------------- :rra if 0@ == 0 then 0@ = 1 else 0@ = 0 end SAMP.CmdRet :fvrr if 15@ == 0 then 15@ = 1 else 15@ = 0 end cmdret Link to comment Share on other sites More sharing options...
Squiz TTC Posted February 2, 2022 Author Share Posted February 2, 2022 14 hours ago, Nic said: Eu nu inteleg ce comanda vrei sa ti recunoasca in joc daca tu ai dat register doar la 0B34: samp register_client_command "fvrr" to_label @cmd_fvrr comanda /fvrr, care in modu tau nu exista nicaieri?? {$CLEO} {$USE CLEO+} 0000: NOP repeat wait 50 until 0AFA: is_samp_structures_available 0b34: "rra" @rra 0b34: "fvrr" @fvrr 15@ = 0 0@ = 0 while true wait 0 //------------------------------linie pentru /fvr automat in 10 secunde cu mesaj----------------------(functional) wait 0 if 15@ == 1 then wait 10000 say "/fvr" 15@ = 0 end //------------------------------linie pentru repair & refill sa caute automat jucatorul in zona ---------------- if 0@ == 1 then for 1@ = 0 to 999 if SAMP.IsPlayerConnected(1@) then 2@ = SAMP.GetActorHandleByPlayerID(1@) 11@ = SAMP.GetPlayerColor(1@) if 056D: 2@ then 00A0: store_actor 2@ position_to 3@ 4@ 5@ 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@ 050A: 9@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 6@ 7@ 8@ if and Actor.Driving(2@) not 9@ > 10.0 not 11@ == 0xFFAA3333 //<---- Exclus hitman cu sau fara undercover activ then if or 11@ == 0xFFD7CE96 //<----- Coleg TTC 11@ == 0xD7CE96 //<------ -//- then say "/repair %d 1" 1@ say "/refill %d 1" 1@ wait 2000 say "/refillgascan %d 1" 1@ else say "/repair %d 50" 1@ say "/refill %d 50" 1@ wait 2000 say "/refillgascan %d 20" 1@ end wait 1000 end end end end 0@ = 0 end end // ---------------[comanda /rra]--------------------------- :rra if 0@ == 0 then 0@ = 1 else 0@ = 0 end SAMP.CmdRet :fvrr if 15@ == 0 then 15@ = 1 else 15@ = 0 end cmdret aia cu fvrr e de la alta comanda care imi merge o am in mod, functioneaza e un lopp sa dea fvrr automat. eu vreau urmatoarea linie /rra sa dea repair + refill automat la cei din zona sa nu mai scriu id/nume suma.. dau /rra cauta jucatorul daca e in zona si ii dau automat comanda, Link to comment Share on other sites More sharing options...
Nic Posted February 2, 2022 Share Posted February 2, 2022 11 hours ago, Squiz TTC said: aia cu fvrr e de la alta comanda care imi merge o am in mod, functioneaza e un lopp sa dea fvrr automat. eu vreau urmatoarea linie /rra sa dea repair + refill automat la cei din zona sa nu mai scriu id/nume suma.. dau /rra cauta jucatorul daca e in zona si ii dau automat comanda, Si ceea ce ti-am trimis eu nu asta face? Nu am verificat in joc, dar in cod asa vad. Ti-am si dat register client command la /rra Link to comment Share on other sites More sharing options...
Squiz TTC Posted February 3, 2022 Author Share Posted February 3, 2022 Compileaza totul ok dar nu-mi recunoaste comanda in joc, poate imi mai trebuie mie ceva samp addons? eu am si samp versiunea veche R1 aia pe care merg toate modurile si care il folosesc toti. ti-am lasat in pm tot modul sa incerci si la tine, Link to comment Share on other sites More sharing options...
Nic Posted February 5, 2022 Share Posted February 5, 2022 On 2/3/2022 at 10:51 AM, Squiz TTC said: Compileaza totul ok dar nu-mi recunoaste comanda in joc, poate imi mai trebuie mie ceva samp addons? eu am si samp versiunea veche R1 aia pe care merg toate modurile si care il folosesc toti. ti-am lasat in pm tot modul sa incerci si la tine, Merge foarte bine comanda, functioneaza, chiar daca nu face chiar ceea ce trebuie instaleaza-ti corect sanny builder-ul, ai un tutorial pe canalul de YouTube Nic B-Zone. Dupa ce reusesti mai vorbim despre functionalitatea modului. Link to comment Share on other sites More sharing options...
Squiz TTC Posted February 6, 2022 Author Share Posted February 6, 2022 10 hours ago, Nic said: Merge foarte bine comanda, functioneaza, chiar daca nu face chiar ceea ce trebuie instaleaza-ti corect sanny builder-ul, ai un tutorial pe canalul de YouTube Nic B-Zone. Dupa ce reusesti mai vorbim despre functionalitatea modului. Ai incercat in game? Poate nu am ceva add-ons de asta intreb... am instalat corect doar asa amfacut si cu modul de ttchelper..ala merge bine Link to comment Share on other sites More sharing options...
Nic Posted February 7, 2022 Share Posted February 7, 2022 On 2/6/2022 at 11:18 AM, Squiz TTC said: Ai incercat in game? Poate nu am ceva add-ons de asta intreb... am instalat corect doar asa amfacut si cu modul de ttchelper..ala merge bine da, nu primesti nici un mesaj in joc cand dai comanda, dar merge. Nu merge doar daca primesti mesaj de la server ca nu exista comanda Link to comment Share on other sites More sharing options...
Squiz TTC Posted February 7, 2022 Author Share Posted February 7, 2022 3 minutes ago, Nic said: da, nu primesti nici un mesaj in joc cand dai comanda, dar merge. Nu merge doar daca primesti mesaj de la server ca nu exista comanda pai aici e greseala, in game imi zice ca nu exista comanda.. am stat si langa jucator si fara si nimic asta incercam sa iti zic in game imi zice: comanda necunoscuta Link to comment Share on other sites More sharing options...
Nic Posted February 7, 2022 Share Posted February 7, 2022 35 minutes ago, Squiz TTC said: pai aici e greseala, in game imi zice ca nu exista comanda.. am stat si langa jucator si fara si nimic asta incercam sa iti zic in game imi zice: comanda necunoscuta Asigura-te ca ai instalat corect Sanny Builder (+ ai adaugat folderu data in sa), asigura-te ca ai SAMPFUNCS 5.3 de preferat, CLEO 4.1-4.3, samp r1 si toate dll-urile necesare pentru samp. Link to comment Share on other sites More sharing options...
Recommended Posts