CLEO Help Help

CLEO related
Status
Not open for further replies.

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
Hi, is there any others ways so send server command like "/gmode" without:
say "/gmode"
0C8F: samp process_chat_input "/gmode"
0AF9: samp say_msg "/gmode"

@supahdupahnubah
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
0x32789 said:
Malchik said:
Hi, is there any others ways so send server command like "/gmode" without:
say "/gmode"
0C8F: samp process_chat_input "/gmode"
0AF9: samp say_msg "/gmode"

@supahdupahnubah

raknet, send a chat rpc.

Can you show me how? I am new to raknet
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
springfield said:
It wouldn't be any difference, what are you trying to achieve/do?

I just want to send a command "/gmode"
When its 0C8F: samp process_chat_input "/gmode" everything works but script just writes it as i would by pressing t and writing command in chat and if the command is spammed i cant even open chat to write something
I need that it would just send that command to server like with that 0AF9: samp say_msg "/gmode" but then server writes me "command unknown"


Malchik said:
springfield said:
It wouldn't be any difference, what are you trying to achieve/do?

I just want to send a command "/gmode"
When its 0C8F: samp process_chat_input "/gmode" everything works but script just writes it as i would by pressing t and writing command in chat and if the command is spammed i cant even open chat to write something
I need that it would just send that command to server like with that 0AF9: samp say_msg "/gmode" but then server writes me "command unknown"

If there is no other way to send this command maybe you could suggest me what to do that this command wouldnt be spammed
Code:
{$CLEO .cs}

0000: NOP
:EntryPoint
wait 0
 SAMP.Available
jf @EntryPoint
10@ = 1
  
WHILE TRUE
    WAIT 0   
IF
056D:   actor $PLAYER_ACTOR defined 
THEN
WAIT 0 
// GET ALL STREAMED PEDS     
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
FOR 30@ = 0 to 35584 step 0x100
    0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
    000A: 29@ += 0x1
    IF AND
        0029:  31@ >= 0x00 
        001B:  0x80 > 31@
    THEN 
        005A: 31@ += 30@
            IF AND
            803B:   31@ == $PLAYER_ACTOR  // (int)
            056D:   actor 31@ defined
            THEN
                0B2B: samp 0@ = get_player_id_by_actor_handle 31@
                0B36: samp 8@ = get_player_nickname 0@ 
                0B37: samp 9@ = get_player_color 0@
                00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
                00A0: store_actor 31@ position_to 4@ 5@ 6@
                0509: 7@ = distance_between_XY 1@ 2@ and_XY 4@ 5@
                    IF AND
                    7@ <= 1.0
                    10@ == 1
                    THEN
                        0C8F: samp process_chat_input "/gmode"
                        10@ = 0
                        wait 200
                        END    
                    IF AND
                    7@ >= 1.0
                    10@ == 0
                    THEN
                        wait 200
                        0C8F: samp process_chat_input "/gmode"
                        10@ = 1          
                        END        
                    END           
                END   
           END
       END     
    END  

It spams "/gmode" then i get close to nearest player and i need that when i come near player it would write "/gmode" one time and after i go away from player it would write "/gmode" again
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
Him try send cleo registered command.
And use something like that " say '/gmode ' " , but this don't work beacose this is not server command.
 

mistery

Well-known member
Joined
Apr 23, 2014
Messages
262
Reaction score
5
oh so u're tryna create a mod which types a command that will activate another mod when a player is close to actor?
well..you could simply edit the wanted mod(your gmode) so that it autoenables when player is in range<20 lets say.This way you dont need a second mod to enable your first mod
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
mistery said:
oh so u're tryna create a mod which types a command that will activate another mod when a player is close to actor?
well..you could simply edit the wanted mod(your gmode) so that it autoenables when player is in range<20 lets say.This way you dont need a second mod to enable your first mod

I would edit that gmode script with pleasure but it has protection from decompile
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
That's odd, it should work as expected. Does typing and calling/gmode yourself works? Maybe the command is not registered? Check in the SF console by using 'chatcmds'.
 
Status
Not open for further replies.
Top