UG-Base Gamehacking

Full Version: Others Player Connection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[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 [email protected] = get_last_command_params
if
0AD4: [email protected] = scan_string [email protected] format "%d" [email protected]
then
if
0B23: samp is_player_connected [email protected]
then
0AF8: samp add_message_to_chat "{00CC00}[AllStar] PlayerID: %d is connected to the server" 0xFFFFFF [email protected]
else
0AF8: samp add_message_to_chat "{9900CC}[AllStar] PlayerID: %d isn't connected to the server" color 0xFFFFFF [email protected]
end
end
0B43: samp cmd_ret


Thanks for reading ! Give your comments below so i can know how you feel about it ?
a lot of this cleo on youtube
useless but part of your cleo tutorial so, good for newbie or learning.
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
(01-11-2017, 02:25 PM)DzkAy Wrote: [ -> ]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 [email protected] = get_player_nickname [email protected]


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

(01-11-2017, 07:17 AM)Shakira Wrote: [ -> ]a lot of this cleo on youtube
Might be Smile
I'm not sure
I just create it by my own risk Smile