CLEO Help If 3@ = "ABCDE", then blah blah

CLEO related
Status
Not open for further replies.

Polaroid

Active member
Joined
Oct 30, 2014
Messages
39
Reaction score
0
Is it possible to check if a variable equals something that isn't an integer before carrying on with the script?

Here's something I made to explain what I mean

:FUCK
wait 0 ms
if and
0457:  player $PLAYER_CHAR aiming_at_actor 1@
0AB0:  key_pressed 1
jf @FUCK
0B2B: samp 2@ = get_player_id_by_actor_handle 1@
0B36: samp 3@ = get_player_nickname 2@
if
not 3@ = "Fishface_Jones" [glow=red,2,300]<--IS IT POSSIBLE TO DO SOMETHING LIKE THIS?![/glow]
jf @FUCK
0AF9: samp say_msg "LOL UR NOT FISHFACE WTF"
jump @FUCK
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
0C21: stricmp string1 0@ string2 1@ //case insensitive
0C14: strcmp string1 0@ string2 1@


ex;
Code:
0B36: samp 3@ = get_player_nickname 2@
IF 8C21: stricmp string1 3@ string2 "Fishface_Jones"
THEN 
    0AF9: samp say_msg "LOL UR NOT FISHFACE WTF"
END
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Btw when you compare something(integer or float) use == instead of single =
Code:
if 0@ == 1
 

Polaroid

Active member
Joined
Oct 30, 2014
Messages
39
Reaction score
0
thanks, guys.

also one more thing which is kind of similar to this question so i didn't want to make a new thread..

how do i make a script not work on my own character? is there an opcode for that or do i do something like ''if not @2 == $playeractor"
 
Status
Not open for further replies.
Top