Resource icon

CLEO Release Others Player Connection

CLEO related
Status
Not open for further replies.

RyanCollier

Active member
Joined
Jul 30, 2016
Messages
109
Reaction score
1
[AllStar-Script] Check if Playerid is Connected to the server 

Hello guys, since i started to work with my partner McRispin... I created many mods / cleos and today i'm gonna release one of my mods, it's useless ( maybe ) haha... But anyway this is still my first cleo so thanks for taking time testing this sh*t...
Command: /checkcon Playerid

If the playerid you just typed in is connected to the server the script will add a message to the chat
Credits to: Ryan Collier and McRispin
Download: In Attachments



Source code: ( You can edit this ! Don't have to ask for my permisson )
Code:
{$CLEO .cs}
0000: NOP "RyanCollier"
thread "AllStar"
wait 2000
:SampAvai
wait 0
if 
0AFA:  is_samp_available
else_jump @SampAvai
0B34: samp register_client_command "check" to_label @Funtion_1
0B34: samp register_client_command "helpcheck" to_label @help
while true
wait 0
end
:help
wait 0
0AF8: samp add_message_to_chat "{FFFF00}[AllStar] Cleo Player Checker by McRispin and RyanCollier" color 0xFFFFFF
0AF8: samp add_message_to_chat "{FFFF00}[AllStar] To check type /checkcon playerid" color 0xFFFFFF
0B43: samp cmd_ret
:Funtion_1
wait 0
0B35: samp 1@ = get_last_command_params
if 
0AD4: 2@ = scan_string 1@ format "%d" 3@ 
then
if 
0B23: samp is_player_connected 3@
then
0AF8: samp add_message_to_chat "{00CC00}[AllStar] PlayerID: %d is connected to the server" 0xFFFFFF 3@
else
0AF8: samp add_message_to_chat "{9900CC}[AllStar] PlayerID: %d isn't connected to the server" color 0xFFFFFF 3@
end
end
0B43: samp cmd_ret


Thanks for reading ! Give your comments below so i can know how you feel about it ?
 

Attachments

  • checkifplayerconnected.cs
    18.5 KB · Views: 147

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Or maybe just check the Player_name instead of ID , because you can actually know the player is online if you already know his ID o_O
 

RyanCollier

Active member
Joined
Jul 30, 2016
Messages
109
Reaction score
1
DzkAy said:
Or maybe just check the Player_name instead of ID , because you can actually know the player is online if you already know his ID o_O
How can i get player_name and store it ?

0B36: samp 2@ = get_player_nickname 1@


How to use this ?
Or it's just like the connection checker ?


Shakira said:
a lot of this cleo on youtube
Might be :)
I'm not sure
I just create it by my own risk :)
 
Status
Not open for further replies.
Top