CLEO Help get full name

CLEO related
Status
Not open for further replies.

Idendity

Member
Joined
Oct 23, 2016
Messages
5
Reaction score
0
if samp.IsCommandTyped("check")
then
for 0@ = 0 to 150
if 0B23:  samp is_player_connected 0@
and if 0C29: 5@ = stristr sz1 29@ sz2 "_lastname"
or if 0C29: 5@ = stristr sz1 29@ sz2 "_lastname"
then
get_player_nickname 5@ 
then
0AF8: samp add_message_to_chat "%s is connected" 5@

wanted to make a cleo that could tell me if people with the same lastname were online by scanning all online ppl but it didn't worked
if somebody could me

thx
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
936
Location
Lithuania
Now you do staff

[shcode=cpp]
{$CLEO .cs}
0000:


REPEAT
  WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

0B34: samp register_client_command "CHECK" to_label @cmd


WHILE TRUE
wait 0

FOR 0@ = 0 TO 999

IF
0B23:  samp is_player_connected 0@
THEN
   IF
   30@ == TRUE
   THEN
       0B36: samp 1@ = get_player_nickname 0@
       0AC8: 2@ = allocate_memory_size 260
       0AD3: 2@ = format "%s" 1@
       IF
       0AD4: $NOT_USED = 2@ "%[^_]_%[^_]" 10@v 20@v  //10@v = first name, 20@v = last name
       THEN
           /// Do test with 20@v
           CHATMSG "%s" -1 20@v
           30@ = FALSE
       ELSE
           CHATMSG 2@ -1
           30@ = FALSE
       END
   END
END

END

END

:cmd
30@ = TRUE
0B43: samp cmd_ret

[/shcode]
 
Status
Not open for further replies.
Top