CLEO Help 0AB5 not working. Alternative?

CLEO related
Status
Not open for further replies.

Mennims

Active member
Joined
Mar 18, 2014
Messages
41
Reaction score
0
Code:
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 1@
That code does not seem to work.  When outputting the variable 1@ into an integer it returns "D". Are there any alternatives for getting the nearest actor?
 

Codex1337

Active member
Joined
Mar 1, 2014
Messages
170
Reaction score
1
It returns player handle (1@) and car handle (0@) and that's not the IDs.
About showing 'D', open Sannybuilder, press F10, click on "Formats" then check on "As is" and recompile the script, it will return "player handle" in integers.
 

Mennims

Active member
Joined
Mar 18, 2014
Messages
41
Reaction score
0
Codex1337 said:
It returns player handle (1@) and car handle (0@) and that's not the IDs.
About showing 'D', open Sannybuilder, press F10, click on "Formats" then check on "As is" and recompile the script, it will return "player handle" in integers.

This time it returns "-1" which I see other people have been noticing as well. Is there a fix? I'm using sampfuncs 5.3
 

Codex1337

Active member
Joined
Mar 1, 2014
Messages
170
Reaction score
1
Try adding this condition (if) "Actor.Define(1@)", if it still returns -1 value then you need to create your own function for it.
Here's a snippet by Opcode.eXe which returns "all" player handles, you can modify according to your needs.

http://ugbase.eu/Thread-SNIPPET-For-All-Peds

If you are still unable to do it, hit me up on PM with your code.
 

Mennims

Active member
Joined
Mar 18, 2014
Messages
41
Reaction score
0
Codex1337 said:
Try adding this condition (if) "Actor.Define(1@)", if it still returns -1 value then you need to create your own function for it.
Here's a snippet by Opcode.eXe which returns "all" player handles, you can modify according to your needs.

http://ugbase.eu/Thread-SNIPPET-For-All-Peds

If you are still unable to do it, hit me up on PM with your code.

I don't see how adding the Actor.Define check would change the output of the value. It's definitely not working. Not in the mood to write and arbitrary script to do something that a function exists to do already THAT IS'NT FUCKING WORKING.
 
Status
Not open for further replies.
Top