aojis Posted April 28, 2013 Share Posted April 28, 2013 (edited) {$CLEO .cs} 0000: while true wait 0 if 0256: 0 jf continue if and 0AB0: 71 0AB0: 89 jf continue 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 073F: get_actor_in_sphere [email protected] [email protected] [email protected] radius 6.0 with_pedtype_civilian 0 gang 1 criminal/prostitute 0 handle_as [email protected] if 056D: [email protected] jf continue if 0457: player $PLAYER_CHAR aiming_at_actor [email protected] jf continue if or 02F2: actor [email protected] model == #FAM1 02F2: actor [email protected] model == #FAM2 02F2: actor [email protected] model == #FAM3 jf continue 0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader 0631: put_actor [email protected] in_group $PLAYER_GROUP wait 1000 end mod by Fabio Edited April 28, 2013 by aojis Link to comment Share on other sites More sharing options...
Dutchy3010 Posted April 28, 2013 Share Posted April 28, 2013 I guess this is just a part of the script? You don't have a lable where you can jump to (:continue)? Very unreadable script. It isn't wrong to only write the parameters. However, it doesn't make the code very clear. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
fastman92 Posted April 28, 2013 Share Posted April 28, 2013 I guess this is just a part of the script? You don't have a lable where you can jump to (:continue)? Very unreadable script. It isn't wrong to only write the parameters. However, it doesn't make the code very clear. continue isn't the 'break' 'continue' statement transfers script execution to the beginning of a loop. 'break' statement transfers script execution to the place past the end of a loop. That script assumes that a player is playing, presses keys 71 and 89, there is gang member in radius 6.0 near the player, player aims at that actor and model IDs are: 02F2: actor [email protected] model == #FAM1 02F2: actor [email protected] model == #FAM2 02F2: actor [email protected] model == #FAM3 If conditions succeeded: 0630: put_actor $PLAYER_ACTOR in_group $PLAYER_GROUP as_leader 0631: put_actor [email protected] in_group $PLAYER_GROUP Link to comment Share on other sites More sharing options...
Dutchy3010 Posted April 28, 2013 Share Posted April 28, 2013 Omg... I was sleeping there... Used this structure in my own codes a lot. Made a code a few days ago with :continue, that's why I was confused Next time, I'll look better at the structure, didn't even see that it was a while true loop. However, I don't see the error in this code. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
Jack Posted April 28, 2013 Share Posted April 28, 2013 What about the mixing of low level and high level code? I'm no expert but that sounds like a bad idea. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Link2012 Posted April 28, 2013 Share Posted April 28, 2013 What about the mixing of low level and high level code? I'm no expert but that sounds like a bad idea. It is ugly, but not something that will break your code. But that's not the case of the above code. jf sounds kinda low-level, but Sanny can't optimize code, so sometimes it is the best thing to do. Link to comment Share on other sites More sharing options...
lendoff Posted April 28, 2013 Share Posted April 28, 2013 ... Link to comment Share on other sites More sharing options...
TheGodfather. Posted May 2, 2013 Share Posted May 2, 2013 Just a note lendoff....Spam posted like u are meant as spam in GTA Forums..So take such kind of attitude outt of the Modding section.. Link to comment Share on other sites More sharing options...
Bad.boy! Posted May 2, 2013 Share Posted May 2, 2013 (edited) Or he had posted something which he later thought wasn't post worthy, and then ninja edited the post? EDIT: @below me, if you edit a post within about a minute, the "edited by" is optional. And you don't have to derail this thread much further by posting that either. Edited May 2, 2013 by Bad.boy! Link to comment Share on other sites More sharing options...
TheGodfather. Posted May 2, 2013 Share Posted May 2, 2013 Well then there must have been written something like this : This post has been edited by Zee on Sunday, Apr 28 2013, 07:22 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now