Ify24 Posted September 10, 2011 Share Posted September 10, 2011 HY guys .. Till now I wasn't using high level coding but now I want And I have a question.. What's wrong whit my script ?? {$CLEO .cs}thread "MYSCRIPT"0A95: enable_thread_savingConstDESERT_EAGLE=24AK_47=30GRENADE=16EndModel.Load(#AK47)Model.Load(#DESERT_EAGLE)Model.Load(#GRENADE)While truewait 0 if andModel.Available(#AK47)Model.Available(#DESERT_EAGLE)Model.Available(#GRENADE)jf Breakend wait 0if00E1: player 0 pressed_key 8then 048F: actor $PLAYER_ACTOR remove_weapons 017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50 017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250 017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3endModel.Destroy(#DESERT_EAGLE)Model.Destroy(#AK47)Model.Destroy(#GRENADE)0A93: end_custom_thread ? Link to comment Share on other sites More sharing options...
Wesser Posted September 10, 2011 Share Posted September 10, 2011 Model-Available checks should be negated. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 o you mean like not Model.Avaible (#AK47) ? Link to comment Share on other sites More sharing options...
Wesser Posted September 10, 2011 Share Posted September 10, 2011 Yeah. Pay attention to 0A93 opcode, which will end the current script too quickly to let player pressing any key. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 Yeah. Pay attention to 0A93 opcode, which will end the current script too quickly to let player pressing any key. So then I can use just end_thread ? Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 So my edited script is not working.. {$CLEO .cs}thread "MYSCRIPT"0A95: enable_thread_savingConstDESERT_EAGLE=24AK_47=30GRENADE=16EndModel.Load(#AK47)Model.Load(#DESERT_EAGLE)Model.Load(#GRENADE)While truewait 0 if andnot Model.Available(#AK47)not Model.Available(#DESERT_EAGLE)not Model.Available(#GRENADE)else_jump @MYSCRIPTjf Breakend :MYSCRIPTPlayer.Defined($PLAYER_CHAR)Player.CanMove($PLAYER_CHAR, true)wait 0if00E1: player 0 pressed_key 8then 048F: actor $PLAYER_ACTOR remove_weapons 017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50 017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250 017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3endModel.Destroy(#DESERT_EAGLE)Model.Destroy(#AK47)Model.Destroy(#GRENADE)end_thread (I typed Player.CanMove () becouse player didn't move..) And when I press Backspace nothing happens... Link to comment Share on other sites More sharing options...
Wesser Posted September 10, 2011 Share Posted September 10, 2011 No, that's not a normal thread as it is a CLEO script. Take a look at the following: {$CLEO}Const GRENADE = 16 DESERT_EAGLE = 24 AK_47 = 30 End0000: NOP0A95: enable_thread_saving#GRENADE.Load()#DESERT_EAGLE.Load()#AK47.Load()while true wait 0 if 00E1: player 0 pressed_key 8 then While true if and #GRENADE.Available() #DESERT_EAGLE.Available() #AK47.Available() then break else wait 0 end end 048F: actor $PLAYER_ACTOR remove_weapons 017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3 017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50 017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250 #GRENADE.Destroy() #DESERT_EAGLE.Destroy() #AK47.Destroy() 0A93: end_custom_thread endend 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
BnB Posted September 10, 2011 Share Posted September 10, 2011 (edited) {$CLEO}0000: const DESERT_EAGLE = 24 AK_47 = 30 GRENADE = 16end#AK47.Load#DESERT_EAGLE.Load#GRENADE.Load038B: load_requested_models while true wait 0 if 00E1: player 0 pressed_key 8 then 048F: actor $PLAYER_ACTOR remove_weapons 017B: set_actor $PLAYER_ACTOR weapon DESERT_EAGLE ammo_to 50 017B: set_actor $PLAYER_ACTOR weapon AK_47 ammo_to 250 017B: set_actor $PLAYER_ACTOR weapon GRENADE ammo_to 3 #AK47.Destroy #DESERT_EAGLE.Destroy #GRENADE.Destroy break endend0A93: Dammit I have to stop using fast reply. Edited September 10, 2011 by BnB Link to comment Share on other sites More sharing options...
Ify24 Posted September 10, 2011 Author Share Posted September 10, 2011 ok tnx guys... E: Wesser, why didn't you put 0a95: before const ? Link to comment Share on other sites More sharing options...
Wesser Posted September 10, 2011 Share Posted September 10, 2011 The order isn't necessary for this kind of things, unless you write a constant before the const...end construct. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ 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