Jump to content

Jocul se inchide imediat dupa Connecting to server


 Share

Recommended Posts

Posted (edited)
  • Descriere problema: Salut, facusem un ticket unde aveam o problema cu modul Cleo modificat de mine (este modul de comenzi scurte a lui EzeQ) am scos din el niste comenzi si am adaugat altele mai utile pentru b-zone. M-am folosit de ChatGPT sa corectez ce era gresit si acum cand dau compile merge, dar cand intru pe joc se blocheaza si imi iese din joc fara crash fara nimic. Ce pot sa ii fac?
  • Poze / Video (optional):
  • Cod (sursa pe baza caruia sa ajutam, daca e cazul): Pastebin: https://pastebin.com/FWdijjqP
  • Alte precizări:

    Modul in fiecare comanda are 0B2A: samp get_last_command_params 0@ 1@ dupa fiecare cmd_ dar daca il inlocuiesc cu cel original adica (SAMP.IsCommandTyped(20@)) nu ii mai pot da compile

     

 

Edited by BtwAdytzu
Uitasem de model
Link to comment
Share on other sites

7 hours ago, BtwAdytzu said:
  • Descriere problema: Salut, facusem un ticket unde aveam o problema cu modul Cleo modificat de mine (este modul de comenzi scurte a lui EzeQ) am scos din el niste comenzi si am adaugat altele mai utile pentru b-zone. M-am folosit de ChatGPT sa corectez ce era gresit si acum cand dau compile merge, dar cand intru pe joc se blocheaza si imi iese din joc fara crash fara nimic. Ce pot sa ii fac?
  • Poze / Video (optional):
  • Cod (sursa pe baza caruia sa ajutam, daca e cazul): Pastebin: https://pastebin.com/FWdijjqP
  • Alte precizări:

    Modul in fiecare comanda are 0B2A: samp get_last_command_params 0@ 1@ dupa fiecare cmd_ dar daca il inlocuiesc cu cel original adica (SAMP.IsCommandTyped(20@)) nu ii mai pot da compile

     

 

@ Tupi poate tu stii cum sa ma ajuti? Stiu ca ultima oara m-ai ajutat cu acel autosalut :)

Link to comment
Share on other sites

Hello,

That freezing is probably caused because you didnt compile your Script Click F6 to compile or click on the compile icon on the top bar 

Link to comment
Share on other sites

Posted (edited)
1 hour ago, AdeM nWo said:

Hello,

That freezing is probably caused because you didnt compile your Script Click F6 to compile or click on the compile icon on the top bar 

i compiled it, it saved but when i enter the game it crashes

video: 

 

Edited by BtwAdytzu
Link to comment
Share on other sites

try with this:


 

{$CLEO}
 
0662: "Comenzi Scurte by EzeQ "
thread "Comenzi Scurte by EzeQ " 
wait 2500 
// Registering client commands
0B34: samp register_client_command "cs" to_label @cmd_cs
0B34: samp register_client_command "off" to_label @cmd_off
0B34: samp register_client_command "on" to_label @cmd_on
0B34: samp register_client_command "gj" to_label @cmd_gj
0B34: samp register_client_command "en" to_label @cmd_en
0B34: samp register_client_command "j" to_label @cmd_j
0B34: samp register_client_command "k" to_label @cmd_k
0B34: samp register_client_command "sc" to_label @cmd_sc
0B34: samp register_client_command "gk" to_label @cmd_gk
0B34: samp register_client_command "fill" to_label @cmd_fill
0B34: samp register_client_command "rrf1" to_label @cmd_rrf1
0B34: samp register_client_command "rr" to_label @cmd_rr
0B34: samp register_client_command "lm" to_label @cmd_lm
0B34: samp register_client_command "lp" to_label @cmd_lp
0B34: samp register_client_command "gg" to_label @cmd_gg
 
:cmd_cs
0AF9: samp say_msg "{FF9900}>-------------------------------{FFFFFF}[ Comenzi Scurte ]{FF9900}-------------------------------<"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/off {FFFFFF}=> /turn off"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/on {FFFFFF}=> /turn on"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/gj {FFFFFF}=> /getjob"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/en {FFFFFF}=> /engine"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/j {FFFFFF}=> /jobs"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/k {FFFFFF}=> /killcp"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/sc {FFFFFF}=> /spawnchange"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/gk {FFFFFF}=> /givekey <id>"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/fill {FFFFFF}=> /fill+/fillgascan"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/rrf1 {FFFFFF}=> /repair+/refill jucatorilor pentru 1$"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/rr {FFFFFF}=> /repair+/refill"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/lm {FFFFFF}=> /leavemission"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/lp {FFFFFF}=> /leavepaintball"
0AF9: samp say_msg "{FFFFFF}*{33FF00}/gg {FFFFFF}=> /getgift"
0AF9: samp say_msg "{FF9900}>-------------------------------------------------------------------------<"
SAMP.CmdRet()
 
:cmd_off
0AF9: samp say_msg "/turn off"
SAMP.CmdRet()
 
:cmd_on
0AF9: samp say_msg "/turn on"
SAMP.CmdRet()
 
:cmd_gj
0AF9: samp say_msg "/getjob"
SAMP.CmdRet()
 
:cmd_en
0AF9: samp say_msg "/engine"
SAMP.CmdRet()
 
:cmd_j
0AF9: samp say_msg "/jobs"
SAMP.CmdRet()
 
:cmd_k
0AF9: samp say_msg "/killcp"
SAMP.CmdRet()
 
:cmd_sc
0AF9: samp say_msg "/spawnchange"
SAMP.CmdRet()
 
:cmd_gk
0B2A: samp get_last_command_params 0@ 1@
if
0AD4: 0@ = scan_string 0@ format "%d" 1@
then
    0B36: samp 2@ = get_player_nickname 1@
    0AF9: samp say_msg "/givekey %s" 2@
else
    0AF9: samp say_msg "~y~/gk <id>" 2000
end
SAMP.CmdRet()
 
:cmd_fill
0AF9: samp say_msg "/fill"
0AF9: samp say_msg "/fillgascan"
SAMP.CmdRet()
 
:cmd_rrf1
0B2A: samp get_last_command_params 0@ 1@
if
0AD4: 0@ = scan_string 0@ format "%d" 1@
then
    0AF9: samp say_msg "/refill %d 1" 1@
    0AF9: samp say_msg "/repair %d 1" 1@
    0AF9: samp say_msg "/refillgascan %d 1" 1@
else
    0AF9: samp say_msg "{ffa85c}Sintaxa: [/rrf1 <id>]."
end
SAMP.CmdRet()
 
:cmd_rr
0AF9: samp say_msg "/repair"
0AF9: samp say_msg "/refill"
SAMP.CmdRet()
 
:cmd_lm
0AF9: samp say_msg "/leavemission"
SAMP.CmdRet()
 
:cmd_lp
0AF9: samp say_msg "/leavepaintball"
SAMP.CmdRet()
 
:cmd_gg
0AF9: samp say_msg "/getgift"
SAMP.CmdRet()

 

Link to comment
Share on other sites

Thanks for the help, i used your code and the help from chatgpt and i got to a point where i installed Cleo 5 (Alpha version) and it works "i had Cleo 4.4 and it still crashes, the only issue is that rrf1 and gk freezez the game, Chatgpt cannot solve the issue from what i can see. This is the working code: 

 

 

{$CLEO}
 
0662: "Comenzi Scurte by EzeQ "
thread "Comenzi Scurte by EzeQ " 
wait 2500 
// Registering client commands
0B34: samp register_client_command "cs" to_label @cmd_cs
0B34: samp register_client_command "off" to_label @cmd_off
0B34: samp register_client_command "on" to_label @cmd_on
0B34: samp register_client_command "gj" to_label @cmd_gj
0B34: samp register_client_command "en" to_label @cmd_en
0B34: samp register_client_command "j" to_label @cmd_j
0B34: samp register_client_command "k" to_label @cmd_k
0B34: samp register_client_command "sc" to_label @cmd_sc
0B34: samp register_client_command "gk" to_label @cmd_gk
0B34: samp register_client_command "fill" to_label @cmd_fill
0B34: samp register_client_command "rrf1" to_label @cmd_rrf1
0B34: samp register_client_command "rr" to_label @cmd_rr
0B34: samp register_client_command "lm" to_label @cmd_lm
0B34: samp register_client_command "lp" to_label @cmd_lp
0B34: samp register_client_command "gg" to_label @cmd_gg
 
:cmd_cs
chatmsg "{FF9900}>-------------------------------{FFFFFF}[ Comenzi Scurte ]{FF9900}-------------------------------<"
chatmsg "{FFFFFF}*{33FF00}/off {FFFFFF}=> /turn off"
chatmsg "{FFFFFF}*{33FF00}/on {FFFFFF}=> /turn on"
chatmsg "{FFFFFF}*{33FF00}/gj {FFFFFF}=> /getjob"
chatmsg "{FFFFFF}*{33FF00}/en {FFFFFF}=> /engine"
chatmsg "{FFFFFF}*{33FF00}/j {FFFFFF}=> /jobs"
chatmsg "{FFFFFF}*{33FF00}/k {FFFFFF}=> /killcp"
chatmsg "{FFFFFF}*{33FF00}/sc {FFFFFF}=> /spawnchange"
chatmsg "{FFFFFF}*{33FF00}/gk {FFFFFF}=> /givekey <id>"
chatmsg "{FFFFFF}*{33FF00}/fill {FFFFFF}=> /fill+/fillgascan"
chatmsg "{FFFFFF}*{33FF00}/rrf1 {FFFFFF}=> /repair+/refill jucatorilor pentru 1$"
chatmsg "{FFFFFF}*{33FF00}/rr {FFFFFF}=> /repair+/refill"
chatmsg "{FFFFFF}*{33FF00}/lm {FFFFFF}=> /leavemission"
chatmsg "{FFFFFF}*{33FF00}/lp {FFFFFF}=> /leavepaintball"
chatmsg "{FFFFFF}*{33FF00}/gg {FFFFFF}=> /getgift"
chatmsg "{FF9900}>-------------------------------------------------------------------------<"
SAMP.CmdRet()
 
:cmd_off
0AF9: samp say_msg "/turn off"
SAMP.CmdRet()
 
:cmd_on
0AF9: samp say_msg "/turn on"
SAMP.CmdRet()
 
:cmd_gj
0AF9: samp say_msg "/getjob"
SAMP.CmdRet()
 
:cmd_en
0AF9: samp say_msg "/engine"
SAMP.CmdRet()
 
:cmd_j
0AF9: samp say_msg "/jobs"
SAMP.CmdRet()
 
:cmd_k
0AF9: samp say_msg "/killcp"
SAMP.CmdRet()
 
:cmd_sc
0AF9: samp say_msg "/spawnchange"
SAMP.CmdRet()
 
:cmd_gk
0B2A: samp get_last_command_params 0@ 1@
if and
    0AD4: 0@ = scan_string 0@ format "%d" 1@
    1@ > 0
then
    0B36: samp 2@ = get_player_nickname 1@
    if
        2@ > 0
    then
        0AF9: samp say_msg "/givekey %s" 2@
    else
        0AF9: samp say_msg "~y~/gk <id>" 2000
    end
else
    0AF9: samp say_msg "~y~/gk <id>" 2000
end
SAMP.CmdRet()

 
:cmd_fill
0AF9: samp say_msg "/fill"
0AF9: samp say_msg "/fillgascan"
SAMP.CmdRet()
 
:cmd_rrf1
0B2A: samp get_last_command_params 0@ 1@
if and

    0AD4: 0@ = scan_string 0@ format "%d" 1@
    1@ > 0
then
    0AF9: samp say_msg "/refill %d 1" 1@
    0AF9: samp say_msg "/repair %d 1" 1@
    0AF9: samp say_msg "/refillgascan %d 1" 1@
else
    0AF9: samp say_msg "{ffa85c}Sintaxa: [/rrf1 <id>]."
end
SAMP.CmdRet()

 
:cmd_rr
0AF9: samp say_msg "/repair"
0AF9: samp say_msg "/refill"
SAMP.CmdRet()
 
:cmd_lm
0AF9: samp say_msg "/leavemission"

SAMP.CmdRet()
 
:cmd_lp
0AF9: samp say_msg "/leavepaintball"
SAMP.CmdRet()
 
:cmd_gg
0AF9: samp say_msg "/getgift"
SAMP.CmdRet()

 

sa-mp-315.thumb.png.917444a6976ba6c55239fd4d0e2b9c82.png

Link to comment
Share on other sites

1 minute ago, BtwAdytzu said:

Thanks for the help, i used your code and the help from chatgpt and i got to a point where i installed Cleo 5 (Alpha version) and it works "i had Cleo 4.4 and it still crashes, the only issue is that rrf1 and gk freezez the game, Chatgpt cannot solve the issue from what i can see. This is the working code: 

 

 

{$CLEO}
 
0662: "Comenzi Scurte by EzeQ "
thread "Comenzi Scurte by EzeQ " 
wait 2500 
// Registering client commands
0B34: samp register_client_command "cs" to_label @cmd_cs
0B34: samp register_client_command "off" to_label @cmd_off
0B34: samp register_client_command "on" to_label @cmd_on
0B34: samp register_client_command "gj" to_label @cmd_gj
0B34: samp register_client_command "en" to_label @cmd_en
0B34: samp register_client_command "j" to_label @cmd_j
0B34: samp register_client_command "k" to_label @cmd_k
0B34: samp register_client_command "sc" to_label @cmd_sc
0B34: samp register_client_command "gk" to_label @cmd_gk
0B34: samp register_client_command "fill" to_label @cmd_fill
0B34: samp register_client_command "rrf1" to_label @cmd_rrf1
0B34: samp register_client_command "rr" to_label @cmd_rr
0B34: samp register_client_command "lm" to_label @cmd_lm
0B34: samp register_client_command "lp" to_label @cmd_lp
0B34: samp register_client_command "gg" to_label @cmd_gg
 
:cmd_cs
chatmsg "{FF9900}>-------------------------------{FFFFFF}[ Comenzi Scurte ]{FF9900}-------------------------------<"
chatmsg "{FFFFFF}*{33FF00}/off {FFFFFF}=> /turn off"
chatmsg "{FFFFFF}*{33FF00}/on {FFFFFF}=> /turn on"
chatmsg "{FFFFFF}*{33FF00}/gj {FFFFFF}=> /getjob"
chatmsg "{FFFFFF}*{33FF00}/en {FFFFFF}=> /engine"
chatmsg "{FFFFFF}*{33FF00}/j {FFFFFF}=> /jobs"
chatmsg "{FFFFFF}*{33FF00}/k {FFFFFF}=> /killcp"
chatmsg "{FFFFFF}*{33FF00}/sc {FFFFFF}=> /spawnchange"
chatmsg "{FFFFFF}*{33FF00}/gk {FFFFFF}=> /givekey <id>"
chatmsg "{FFFFFF}*{33FF00}/fill {FFFFFF}=> /fill+/fillgascan"
chatmsg "{FFFFFF}*{33FF00}/rrf1 {FFFFFF}=> /repair+/refill jucatorilor pentru 1$"
chatmsg "{FFFFFF}*{33FF00}/rr {FFFFFF}=> /repair+/refill"
chatmsg "{FFFFFF}*{33FF00}/lm {FFFFFF}=> /leavemission"
chatmsg "{FFFFFF}*{33FF00}/lp {FFFFFF}=> /leavepaintball"
chatmsg "{FFFFFF}*{33FF00}/gg {FFFFFF}=> /getgift"
chatmsg "{FF9900}>-------------------------------------------------------------------------<"
SAMP.CmdRet()
 
:cmd_off
0AF9: samp say_msg "/turn off"
SAMP.CmdRet()
 
:cmd_on
0AF9: samp say_msg "/turn on"
SAMP.CmdRet()
 
:cmd_gj
0AF9: samp say_msg "/getjob"
SAMP.CmdRet()
 
:cmd_en
0AF9: samp say_msg "/engine"
SAMP.CmdRet()
 
:cmd_j
0AF9: samp say_msg "/jobs"
SAMP.CmdRet()
 
:cmd_k
0AF9: samp say_msg "/killcp"
SAMP.CmdRet()
 
:cmd_sc
0AF9: samp say_msg "/spawnchange"
SAMP.CmdRet()
 
:cmd_gk
0B2A: samp get_last_command_params 0@ 1@
if and
    0AD4: 0@ = scan_string 0@ format "%d" 1@
    1@ > 0
then
    0B36: samp 2@ = get_player_nickname 1@
    if
        2@ > 0
    then
        0AF9: samp say_msg "/givekey %s" 2@
    else
        0AF9: samp say_msg "~y~/gk <id>" 2000
    end
else
    0AF9: samp say_msg "~y~/gk <id>" 2000
end
SAMP.CmdRet()

 
:cmd_fill
0AF9: samp say_msg "/fill"
0AF9: samp say_msg "/fillgascan"
SAMP.CmdRet()
 
:cmd_rrf1
0B2A: samp get_last_command_params 0@ 1@
if and

    0AD4: 0@ = scan_string 0@ format "%d" 1@
    1@ > 0
then
    0AF9: samp say_msg "/refill %d 1" 1@
    0AF9: samp say_msg "/repair %d 1" 1@
    0AF9: samp say_msg "/refillgascan %d 1" 1@
else
    0AF9: samp say_msg "{ffa85c}Sintaxa: [/rrf1 <id>]."
end
SAMP.CmdRet()

 
:cmd_rr
0AF9: samp say_msg "/repair"
0AF9: samp say_msg "/refill"
SAMP.CmdRet()
 
:cmd_lm
0AF9: samp say_msg "/leavemission"

SAMP.CmdRet()
 
:cmd_lp
0AF9: samp say_msg "/leavepaintball"
SAMP.CmdRet()
 
:cmd_gg
0AF9: samp say_msg "/getgift"
SAMP.CmdRet()

 

sa-mp-315.thumb.png.917444a6976ba6c55239fd4d0e2b9c82.png

i could just remove the 2 commands but i would want to keep them because i think they are usefull and because Givekey from the original mod works, which now it doesn't and rrf1 from ttchelper also works, but not in this mod

 

Link to comment
Share on other sites

Hello, for the givekey & rrf1 use this:

 

:cmd_gk
SAMP.IsCommandTyped(20@, 26@)
if 
0AD4: 20@ = scan_string 20@ format "%d" 21@                                    
else_jump @error_gk    
say "/givekey %d" 21@ 
samp.CmdRet()

:error_gk
chatmsg "Error: Use /gk <id>" -1 
samp.CmdRet()

:cmd_rrf1
SAMP.IsCommandTyped(20@, 26@)
if and
    0AD4: 20@ = scan_string 20@ format "%d" 1@
    1@ > 0
else_jump @error_rrf1
    0AF9: samp say_msg "/refill %d 1" 1@
    0AF9: samp say_msg "/repair %d 1" 1@
    0AF9: samp say_msg "/refillgascan %d 1" 1@
SAMP.CmdRet()

:error_rrf1
chatmsg "Error: Use /rrf1 <id>" -1 
samp.CmdRet()

 

Edited by AdeM nWo
Link to comment
Share on other sites

Thank you again for your help, both commands now work just fine, i had a problem where opcode 4C46 was not registered but i solved it with ChatGPT, so now i can FINALLY say the mod works normally without any type of errors or crashes, thank you again for your help, Here is the final code! 


 

{$CLEO}
 
0662: "Comenzi Scurte by EzeQ "
thread "Comenzi Scurte by EzeQ " 
wait 2500
0B34: samp register_client_command "cs" to_label @cmd_cs
0B34: samp register_client_command "off" to_label @cmd_off
0B34: samp register_client_command "on" to_label @cmd_on
0B34: samp register_client_command "gj" to_label @cmd_gj
0B34: samp register_client_command "en" to_label @cmd_en
0B34: samp register_client_command "j" to_label @cmd_j
0B34: samp register_client_command "k" to_label @cmd_k
0B34: samp register_client_command "sc" to_label @cmd_sc
0B34: samp register_client_command "fill" to_label @cmd_fill
0B34: samp register_client_command "rr" to_label @cmd_rr
0B34: samp register_client_command "lm" to_label @cmd_lm
0B34: samp register_client_command "lp" to_label @cmd_lp
0B34: samp register_client_command "gg" to_label @cmd_gg
0B34: samp register_client_command "gk" to_label @cmd_gk
0B34: samp register_client_command "rrf1" to_label @cmd_rrf1
0AB1: call_scm_func @chatmsg 0 

:cmd_cs1
wait 0
jump @cmd_cs
 
:cmd_cs
chatmsg "{FF9900}>-------------------------------{FFFFFF}[ Comenzi Scurte ]{FF9900}-------------------------------<"
chatmsg "{FFFFFF}*{33FF00}/off {FFFFFF}=> /turn off"
chatmsg "{FFFFFF}*{33FF00}/on {FFFFFF}=> /turn on"
chatmsg "{FFFFFF}*{33FF00}/gj {FFFFFF}=> /getjob"
chatmsg "{FFFFFF}*{33FF00}/en {FFFFFF}=> /engine"
chatmsg "{FFFFFF}*{33FF00}/j {FFFFFF}=> /jobs"
chatmsg "{FFFFFF}*{33FF00}/k {FFFFFF}=> /killcp"
chatmsg "{FFFFFF}*{33FF00}/sc {FFFFFF}=> /spawnchange"
chatmsg "{FFFFFF}*{33FF00}/fill {FFFFFF}=> /fill+/fillgascan"
chatmsg "{FFFFFF}*{33FF00}/rr {FFFFFF}=> /repair+/refill"
chatmsg "{FFFFFF}*{33FF00}/lm {FFFFFF}=> /leavemission"
chatmsg "{FFFFFF}*{33FF00}/lp {FFFFFF}=> /leavepaintball"
chatmsg "{FFFFFF}*{33FF00}/gg {FFFFFF}=> /getgift"
chatmsg "{FFFFFF}*{33FF00}/gk {FFFFFF}=> /givekey"
chatmsg "{FFFFFF}*{33FF00}/rrf1 {FFFFFF}=> /repair+/refill+/refillgascan 1$"
chatmsg "{FF9900}>-------------------------------------------------------------------------<"
SAMP.CmdRet()
 
:cmd_off
0AF9: samp say_msg "/turn off"
SAMP.CmdRet()
 
:cmd_on
0AF9: samp say_msg "/turn on"
SAMP.CmdRet()
 
:cmd_gj
0AF9: samp say_msg "/getjob"
SAMP.CmdRet()
 
:cmd_en
0AF9: samp say_msg "/engine"
SAMP.CmdRet()
 
:cmd_j
0AF9: samp say_msg "/jobs"
SAMP.CmdRet()
 
:cmd_k
0AF9: samp say_msg "/killcp"
SAMP.CmdRet()
 
:cmd_sc
0AF9: samp say_msg "/spawnchange"
SAMP.CmdRet()
 

:cmd_fill
0AF9: samp say_msg "/fill"
0AF9: samp say_msg "/fillgascan"
SAMP.CmdRet()
 

:cmd_rr
0AF9: samp say_msg "/repair"
0AF9: samp say_msg "/refill"
SAMP.CmdRet()
 
:cmd_lm
0AF9: samp say_msg "/leavemission"
SAMP.CmdRet()
 
:cmd_lp
0AF9: samp say_msg "/leavepaintball"
SAMP.CmdRet()
 
:cmd_gg
0AF9: samp say_msg "/getgift"
SAMP.CmdRet()

:cmd_gk
SAMP.IsCommandTyped(20@, 26@)
if 
0AD4: 20@ = scan_string 20@ format "%d" 21@                                    
else_jump @error_gk    
say "/givekey %d" 21@ 
samp.CmdRet()

:error_gk
chatmsg "Error: Use /gk <id>" -1 
samp.CmdRet()

:cmd_rrf1
SAMP.IsCommandTyped(20@, 26@)
if and
    0AD4: 20@ = scan_string 20@ format "%d" 1@
    1@ > 0
else_jump @error_rrf1
    0AF9: samp say_msg "/refill %d 1" 1@
    0AF9: samp say_msg "/repair %d 1" 1@
    0AF9: samp say_msg "/refillgascan %d 1" 1@
SAMP.CmdRet()

:error_rrf1
chatmsg "Error: Use /rrf1 <id>" -1 
samp.CmdRet()

:chatmsg
0AA2: 0@ = load_library "samp.dll" // IF and SET 
0085: 1@ = 0@ // (int) 
1@ += 2203876 
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 1 
0085: 2@ = 0@ // (int) 
2@ += 409616 
chatmsg "{FFFFFF}[Comenzi Scurte] {FFFF00}Comenzi scurte pentru playeri{FFFF00}." -1
chatmsg "{FFFF00}Foloseste {FFFFFF}[/cs] {FFFF00}pentru a vedea comenzile." -1


// Script name: RegisterOpcode4C46.cs

0000: NOP // This is a no-operation command and often used to mark the start of a script

// Registering opcode 4C46 and creating a new thread
THREAD 'NEWTHREAD'

// Start of the new thread
:NEWTHREAD
0001: wait 0 ms // Wait 0 milliseconds before executing the next line

// Main loop
:MAIN_LOOP
0001: wait 0 ms // Wait 0 milliseconds before executing the next line

00D6: if 
0AB0:   key_pressed 0x57 // Check if 'W' key is pressed
004D: jump_if_false @CHECK_CONDITIONS // If false, jump to the next condition check

00D6: if 
0AB0:   key_pressed 0x53 // Check if 'S' key is pressed
004D: jump_if_false @CHECK_CONDITIONS // If false, jump to the next condition check

00D6: if 
0AB0:   key_pressed 0x41 // Check if 'A' key is pressed
004D: jump_if_false @CHECK_CONDITIONS // If false, jump to the next condition check

00D6: if 
0AB0:   key_pressed 0x44 // Check if 'D' key is pressed
004D: jump_if_false @CHECK_CONDITIONS // If false, jump to the next condition check

004F: create_thread @CUSTOM_ACTION // Create a new thread to perform a custom action

:CHECK_CONDITIONS
00D6: if 
8118:   not player $PLAYER_CHAR defined // Check if the player is not defined (example of OR condition)
004D: jump_if_false @MAIN_LOOP // If false, continue with the loop

004D: jump @END_SCRIPT // End the script if the player is not defined

:CUSTOM_ACTION
0001: wait 0 ms // Wait for 0 milliseconds
// Your custom action here
0002: jump @MAIN_LOOP // Jump back to the main loop

:END_SCRIPT
0A93: end_custom_thread // Ends the current custom thread

 

Link to comment
Share on other sites

No problem, if you wish to fix the problem with opcodes follow the youtube tutorial video below:
 

 

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.