Untagged Release samp_commands (for Cleo)

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
151
It allows to register commands to labels in Cleo without Sampfuncs opcodes. Please check the github repository for the details, source and cleo examples. (It's easier to maintain when stuff is written once).

Essentially, this is functionality it brings to cleo:
Code:
0AB1: @register_commands_from_label 1 @cmd_store

while true
wait 0

end

:cmd_store
hex
">mycommand" 00 @my_1st_cmd
"*mycommand" 00 @my_2nd_cmd

00 // this 00 must be just before end
end

:my_1st_cmd
if 0AB1: @get_last_command_params 0 _returned_string 3@
then
    0AD1: show_formatted_text_highpriority "my_1st_cmd params = ~G~%s" time 2000 3@
else
    0AD1: show_formatted_text_highpriority "my_1st_cmd didn't have any params" time 2000
end
0AB1: @cmd_ret 0

Virus Total scan of samp_commands.asi

Credits/resources used:
0x688 - Do your own SA:MP command's. tutorial
Luchare's - SAMP-API
mod_s0beit_sa
springfield - SetText function (InputBox)
 

Attachments

  • samp_commands.asi
    13 KB · Views: 46
Last edited:

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,116
Reaction score
167
Approved
Nice work :)
 
Last edited:

Jik ke

Active member
Joined
Jun 2, 2021
Messages
43
Reaction score
2
Location
America
I tried everything like reinstalling the game, installing cleo 4.3... but still not working? can you help me?
 

Attachments

  • sampcommand.PNG
    sampcommand.PNG
    79.7 KB · Views: 63
  • sa-mp-239.png
    sa-mp-239.png
    1.1 MB · Views: 58

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
151
is the label "samp commands.asi isn't loaded" ever disappearing? Or is it constantly on the screen?

It looks like this function fails for some reason:
Code:
if 0AA2: 31@ = load_library "samp_commands.asi"

cleo.asi is loaded properly though, so it's kind of weird that samp_commands.asi isn't, I'm out of ideas why that's the case to be honest...

I guess the 0AA2 opcode is case-insensitive anyway but you could make sure that in "Sanny Builder -> Tools -> Options -> Formats" you select "As is" case conversion setting
 
Last edited:

Jik ke

Active member
Joined
Jun 2, 2021
Messages
43
Reaction score
2
Location
America
is the label "samp commands.asi isn't loaded" ever disappearing? Or is it constantly on the screen?

It looks like this function fails for some reason:
Code:
if 0AA2: 31@ = load_library "samp_commands.asi"

cleo.asi is loaded properly though, so it's kind of weird that samp_commands.asi isn't, I'm out of ideas why that's the case to be honest...

I guess the 0AA2 opcode is case-insensitive anyway but you could make sure that in "Sanny Builder -> Tools -> Options -> Formats" you select "As is" case conversion setting
I tried using someone else's cleo, samp_command.asi. But can other people use it, but I can't?
only when install cleo, the new lines "samp_command.asi ins't Load" appear
 

bindo2512

New member
Joined
Oct 23, 2020
Messages
2
Reaction score
0
Location
Norway
What types of cleo need to use samp command-asi, can you suggest me some?
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
151
A mod that:
- uses commands (e.g. to activate/deactivate some action, or to input some name/string)
- doesn't use sampfuncs (sampfuncs allows to use commands easily, so if it's used then there is no need to use samp_commands.asi)

Or a mod that uses commands starting with unusual character instead of the standard "/" (which isn't possible with sampfuncs as far as I know)
 

SamThapa

Active member
Joined
Jan 22, 2018
Messages
37
Reaction score
1
when I saw this here I was shocked I thought God I found it but sad its not what I was looking for I want that samp command panel that I can use in single player that press T to open chat command
 
Top