Irsis Posted December 24, 2017 Share Posted December 24, 2017 Hi everyone, i managed to create a code that make CJ lose all of his money when he is wasted, so bank mod is more useful now. But i dont know how to make this event randomly occur. Can you help me please? {$CLEO .cs}//-------------MAIN---------------thread 'STOLEN' :Stolen_1 wait 0 Player.Defined($PLAYER_CHAR)eLSE_Jump @[email protected] = Actor.Health($PLAYER_ACTOR)010B: [email protected] = player $PLAYER_CHAR money0006: [email protected] = [email protected] 0if and 0012: [email protected] *= 2 000E: [email protected] -= [email protected] not [email protected] >= 1 else_jump @Stolen_1wait 500 Player.Money($PLAYER_CHAR) += [email protected] 850003E5: show_text_box 'STEAL' // Someone stole all your money when you are unconscious... :[email protected] = Actor.Health($PLAYER_ACTOR)wait 0 if [email protected] > 1 else_jump @Stolen_2 Player.Money($PLAYER_CHAR) += 0 jump @Stolen_1Thank you Link to comment Share on other sites More sharing options...
GuruGuru Posted December 24, 2017 Share Posted December 24, 2017 You could generate a random number between 1 and 100.Compare if it is below your desired probability percentage and activate the steal if is true. Irsis 1 Link to comment Share on other sites More sharing options...
Irsis Posted December 24, 2017 Author Share Posted December 24, 2017 Umm, how? Can you give me an example? What opcode should i use? Im still learning in scripting. Thank you. Link to comment Share on other sites More sharing options...
GuruGuru Posted December 24, 2017 Share Posted December 24, 2017 https://gtagmodding.com/opcode-database/opcode/0209/ Also,I strongly recommend you to use gta3script to make Cleo scripts.It is easier and comfier to script using that tool. http://gtaforums.com/topic/876530-gta3script-toolchain/ Irsis 1 Link to comment Share on other sites More sharing options...
Irsis Posted December 25, 2017 Author Share Posted December 25, 2017 Thank you! Link to comment Share on other sites More sharing options...