CLEO Help Write automatically commands after joining a server

CLEO related
Status
Not open for further replies.

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
Hi i want someone that can code for me a cleo script that writes a commands that i specify in the script after joining in server and login. I want it to write them automatically after loging in. If it writes them immediatly before logging in my account it wont work in the server.
 

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
Hi i want someone that can code for me a cleo script that writes a commands that i specify in the script after joining in server and login. I want it to write them automatically after loging in. If it writes them immediatly before logging in my account it wont work in the server.
 

FirstTime

Member
Joined
Apr 28, 2021
Messages
12
Reaction score
0
Location
Los Santos
Use lua, here's your lua code.(easy)

Code:
function main()
    while not isSampAvailable() do wait(0) end
    while true do
        wait(0)
        if sampIsLocalPlayerSpawned() then
            sampSendChat('Text')
            break
        end
    end
end
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
Use lua, here's your lua code.(easy)

Code:
function main()
    while not isSampAvailable() do wait(0) end
    while true do
        wait(0)
        if sampIsLocalPlayerSpawned() then
            sampSendChat('Text')
            break
        end
    end
end


Same in cleo...
I also easy can make it without SF....

C++:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

while true
wait 0

if 0B61:  samp is_local_player_spawned
then
    if 31@ == FALSE
    then
        0AF9: samp say_msg "/sunny"
        0AF8: samp add_message_to_chat "Command Sent" color -1
        31@ = TRUE
    end
end

end
 

FirstTime

Member
Joined
Apr 28, 2021
Messages
12
Reaction score
0
Location
Los Santos
Same in cleo...
I also easy can make it without SF....

C++:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

while true
wait 0

if 0B61:  samp is_local_player_spawned
then
    if 31@ == FALSE
    then
        0AF9: samp say_msg "/sunny"
        0AF8: samp add_message_to_chat "Command Sent" color -1
        31@ = TRUE
    end
end

end
Cool, I say it's easier in lua, and what sf has to do with it explain to me. I don't understand why someone is looking without SF?
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
Do you use Windows XP?
This forum and members in 2013.
I don’t work with cleo, just lua. There are more possibilities.
You desktop look like windows 95

1. Not, i just made windows edit to look bit old.
2. I not asked which coding language you doing., i just asked can you make codes without using SF plugins...
 

Excelds

Active member
Joined
Apr 17, 2021
Messages
101
Reaction score
11
Location
Earth
doesnt work joined the server and it didnt worked parazitas @Parazitas this is the code:
Code:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

while true
wait 0

if 0B61:  samp is_local_player_spawned
then
    if 31@ == FALSE
    then
        0AF9: samp say_msg "/protect"
        0AF9: samp say_msg "/helmet"
        0AF9: samp say_msg "/togmsg"
        0AF9: samp say_msg "/clothes"
        0AF9: samp say_msg "/sgchange"
        31@ = TRUE
    end
end

end
 

FirstTime

Member
Joined
Apr 28, 2021
Messages
12
Reaction score
0
Location
Los Santos
doesnt work joined the server and it didnt worked parazitas @Parazitas this is the code:
Code:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

while true
wait 0

if 0B61:  samp is_local_player_spawned
then
    if 31@ == FALSE
    then
        0AF9: samp say_msg "/protect"
        0AF9: samp say_msg "/helmet"
        0AF9: samp say_msg "/togmsg"
        0AF9: samp say_msg "/clothes"
        0AF9: samp say_msg "/sgchange"
        31@ = TRUE
    end
end

end
Maybe spam protection on server, no delay.
 

Attachments

  • say.cs
    17.6 KB · Views: 6

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
oh i forgot to add them to the cleo folder xd it works but it writes the commands before i log in my account and it says in the chat cant use commands before logging in to your acc

That means your server spawn player before he successfully logins...

There's two ways to bypass that.
1. You can check any dialog not exist and send command
2. Make it send after when login dialog are disappeared, which means you are successful login to server.
 
Last edited:
Status
Not open for further replies.
Top