CLEO Help samp say_msg problem

CLEO related
Status
Not open for further replies.

Lordul202021

Member
Joined
Jan 31, 2020
Messages
8
Reaction score
1
Location
Ukraine
hi, i want to make something when i type '/cjob' to auto send '/quitjob' then 'getjob'

i tried using this code
Code:
0B34: samp register_client_command "cjob" to_label @cmd

:cmd
SAMP.IsCommandTyped(20@)
    0AF9: samp say_msg "/quitjob"
    wait 600
    0AF9: samp say_msg "/getjob"
SAMP.CmdRet()

but it sends just /quitjob and i dont understand why, it happens just for some servers, not all of them
thanks
 

Lordul202021

Member
Joined
Jan 31, 2020
Messages
8
Reaction score
1
Location
Ukraine
Code:
while true
wait 0
    if 31@ == true
    then
        31@ = false
        0AF9: samp say_msg "/quitjob"
        wait 300
        0AF9: samp say_msg "/getjob"
    end
end

:lh242_3_2
31@ = true
samp.CmdRet()

i used this and its working
 
Last edited:

Lordul202021

Member
Joined
Jan 31, 2020
Messages
8
Reaction score
1
Location
Ukraine
i have another problem now, i want to make more commands with that code, i use this
Code:
while true
wait 0
    if 31@ == true
    then
        31@ = false
        0AF9: samp say_msg "/fill"
        wait 300
        0AF9: samp say_msg "/fillgascan"
    end
end

:lh242_3_3
31@ = true
samp.CmdRet()

but the problem is that the first code (/cjob) is combining with the second (it should be /gaz), /cjob is working properly but when i type /gaz it sends me /quitjob instead of /fill and /fillgascan, what should i do?
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,104
Solutions
5
Reaction score
882
Location
Lithuania
Can you do: copy, paste, compile?
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

0B34: samp register_client_command "cjob" to_label @cmd1
0B34: samp register_client_command "gaz" to_label @cmd2

while true
wait 0

if 31@ == true
then
    31@ = false
    0AF9: samp say_msg "/quitjob"
    wait 300
    0AF9: samp say_msg "/getjob"
end

if 30@ == true
then
    30@ = false
    0AF9: samp say_msg "/fill"
    wait 300
    0AF9: samp say_msg "/fillgascan"
end

end

:cmd1
31@ = true
SAMP.CmdRet()

:cmd2
30@ = true
SAMP.CmdRet()
 

Lordul202021

Member
Joined
Jan 31, 2020
Messages
8
Reaction score
1
Location
Ukraine
Can you do: copy, paste, compile?
PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

0B34: samp register_client_command "cjob" to_label @cmd1
0B34: samp register_client_command "gaz" to_label @cmd2

while true
wait 0

if 31@ == true
then
    31@ = false
    0AF9: samp say_msg "/quitjob"
    wait 300
    0AF9: samp say_msg "/getjob"
end

if 30@ == true
then
    30@ = false
    0AF9: samp say_msg "/fill"
    wait 300
    0AF9: samp say_msg "/fillgascan"
end

end

:cmd1
31@ = true
SAMP.CmdRet()

:cmd2
30@ = true
SAMP.CmdRet()

its working, thank you sooo muh
 
Status
Not open for further replies.
Top