IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 [Doubt] How to CLEO this be disabled?

 
ConfusoSobrinho  
Posted: Thursday, Sep 20 2012, 04:07
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Sep 14, 2012

ba.gif

XXXXX



CODE
:NONAME_24
WAIT 0
IF and
  Player.Defined($PLAYER_CHAR)
  Player.Controllable($PLAYER_CHAR)
KEY_PRESSED 76
ELSE_GOTO @NONAME_24
IF or
00E1:   player 0 pressed_key 1
00E1:   player 0 pressed_key 0
ELSE_GOTO @NONAME_24
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 9@
IF
  Actor.Defined(9@)
ELSE_GOTO @NONAME_24
Car.RemoveReferences(0@)
018C: play_sound 1084 at 0.0 0.0 0.0
00BC: show_text_highpriority GXT 'CHEAT1' time 3000 flag 1  // Cheat activated
JUMP @NONAME_151

:NONAME_151
01B2: give_actor 9@ weapon 0 ammo 1 // Load the weapon model before using this
SET_ACTOR_ARMED_WEAPON 9@ 0
05E2: AS_actor 9@ kill_actor 9@
WAIT 0
IF or
  not Actor.Defined(9@)
  not Actor.Dead($PLAYER_ACTOR)
ELSE_GOTO @NONAME_151
Actor.RemoveReferences(9@)
JUMP @NONAME_24


The Cleo works normally, but I can not disable it. And it does get buggy NPC in the game. Does anyone know how to make NPC return to normal?

This post has been edited by ConfusoSobrinho on Thursday, Sep 20 2012, 19:43
PM
  Top
 

 
JACK JONES  
Posted: Friday, Sep 21 2012, 06:40
Quote Post


firearms and adrenaline
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



First of all why are you posting a decompiled code? Open the text document where you were writing opcodes and post that. Which tool are you using for compiling the code? Use Sanny Builder and put "jump_if_false or jf or else_jump (004d)" instead of else_goto.
Of course that NPC gets bugy - it's because the actor 9@ desperately try to commit suicide:
CODE
05E2: AS_actor 9@ kill_actor 9@

For god sake just shoot the moron and put him out of his misery (or use the opcode 05BE).
The command "01C2: remove_references_to_actor 9@" will make the actor normal again.
Better yet - use the command 05E2 and force the actor to shoot YOU becausse your code is a total disaster.
I'm done talking, read this:
CLEO tutorial
PM
  Top
 

 
Wesser  
Posted: Friday, Sep 21 2012, 08:50
Quote Post


The complexity simplifier, the efficiency optimizer
Group Icon
Group: Members
Joined: Aug 19, 2006

eu.gif

Member Award




NPC are not buggy, at least in this case. You are forcing a char to perform a task in a loop which continuously refreshes the task itself. Within a loop, you must check with 062E whether the task is already active or not before assigning it to a char:
CODE
const
 TASK_STATE_ACTIVE = 1
 TASK_STATE_INACTIVE = 7
end

[...]

// Is TASK_COMBAT active?
062E: get_actor 0@ task 1506 status_store_to 1@ // TASK_COMBAT
if
04A4:  1@ == TASK_STATE_INACTIVE
then
 05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR
end

[...]

// Clear the current task and so TASK_COMBAT
0687: clear_actor 0@ task

[...]

Jack, it's likely it is a little slip. Yours isn't the answer of what he is really trying to achieve. Moreover, the code is in SB format, he is "just" using Deji's SCR commands. wink.gif
PMMSNPlayStation Network
  Top
 

 
JACK JONES  
Posted: Friday, Sep 21 2012, 10:35
Quote Post


firearms and adrenaline
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



QUOTE
NPC are not buggy, at least in this case.

Ok if you say so but I thought the buggy character would be the one who's trying to shoot at himself (not very logical).
QUOTE
Moreover, the code is in SB format, he is "just" using Deji's SCR commands.

Sorry I didn't know about that.
PM
  Top
 

 
ConfusoSobrinho  
Posted: Friday, Sep 21 2012, 16:28
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Sep 14, 2012

ba.gif

XXXXX



I do not know much about cleo, I would like that when I pressed the button "L" once he was activated. And when I pressed "L" again, the NPC's back to normal. (Was off)

PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG