CLEO Help Anyone know how to use if car is near & onfoot then...???

CLEO related
Status
Not open for further replies.

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
0
Here's the current script:

Code:
if 
0@ == 70
then
if //SNIPPET: Will use soon: 09B3: get_car 5@ door_status 11@ 
0203: actor $PLAYER_ACTOR near_car 1@ radius 5.0 5.0 flag 0 on_foot
then
0AF9: samp say_msg "Near."
end
0AF0: 1@ = get_int_from_ini_file "cleo\kbult.ini" section "kb" key "unislimit"
wait 1@
end

However, it doesn't work. It doesn't execute the IF function. It doesn't say "Near." when I press the button and there's a car nearby. What's wrong with this? How is it supposed to be used? Help?
 

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
0
TehArgis said:
0@ == 70 is supposed to be the key?
Maybe you mean key_down 70?

Nope that works. I just didn't put the whole code b/c. I know it works.

I just added this part (the if doesn't execute) and I know that's what doesn't work.
 

Supermacy31

Active member
Joined
Mar 13, 2013
Messages
173
Reaction score
0
springfield said:
Are you sure 1@ is a valid handle?
OMG. I think that I get it now.

It's thinking that I have a specific car in-mind:

0203: actor $PLAYER_ACTOR near_car 1@ radius 5.0 5.0 flag 0 on_foot

When you use this and you put near_car 1@ it's checking if car 1@ is near-by right?

But that's not what I want to do. Ugh.

I'm actually trying to check that if there's a car nearby (any model) then do something.

But now I want to check:

- If there's a car near-by, you're on-foot, and it's a premier then
do something...

This snippet wouldn't work for that - would it?

If I put
1@ = "#PREMIER" 

Would it work to detect if a premier is near-by or no? How would this be done?
 
Status
Not open for further replies.
Top