{$CLEO .cs} 
2@ = 1 
gosub @Load 
[секция1] 
key1 = value 
Key2 = value 
[секция2] 
key1 = value 
Key2 = value 
:Load 
wait 0 
 if 0AAB: file_exists "cleo\\skin.ini" 
 then 
 0AF0: 2@ = get_int_from_ini_file "cleo\\skin.ini" section "settings" key "skin" 
 gosub @SkinChange 
 end 
jump @Scan 
:SkinChange 
 wait 0 
 if statement and // check if 
 player.Defined(0) // player created and 
 not actor.Dead($PLAYER_ACTOR) // not dead 
 jf @SkinChange 
// change skin 
 if 2@ == 1 // if flag is 1 then 
 then // return the skin of CJ-I 
 09C7: change_player $PLAYER_CHAR model_to 0 
 0AF1: write_int 2@ to_ini_file "cleo\\skin.ini" section "settings" key "skin" // save the setting 
 2@ = #ARMY // toggle the flag 
 else 
 // if the flag is not equal to 1 then 
 Model.Load(2@) // downloadable models of our skin 
 038B: load_requested_models // always use this function after loading the models 
 if Model.Available(2@) // if our model is available that 
 then 
 09C7: change_player $PLAYER_CHAR model_to 2@ // change skin 
 Model.Destroy(2@) // free the memory 
 0AF1: write_int 2@ to_ini_file "cleo\\skin.ini" section "settings" key "skin" // save the settings 
 2@ = 1 // toggle the flag 
 end 
 end 
return // back to where the function was called 
 <!--/smile--> here I specifically commented every line of code that would make it easier to navigate. In a nutshell: Check whether all is fine with the player, if Yes then check the flag. If our flag is equal to 1 then return true form of Charles, or in my case perevoploschat in the army. Save the settings and toggle a flag indicating which one to load next time when you click.
<!--/smile--> here I specifically commented every line of code that would make it easier to navigate. In a nutshell: Check whether all is fine with the player, if Yes then check the flag. If our flag is equal to 1 then return true form of Charles, or in my case perevoploschat in the army. Save the settings and toggle a flag indicating which one to load next time when you click.
:Scan 
wait 0 
if 
0AB0: key_pressed 0x50 
jf @Scan 
 gosub @SkinChange 
 wait 100 
jump @Scan 
{$CLEO .cs} 
2@ = 1 
gosub @Load
:Load 
wait 0 
 if 0AAB: file_exists "cleo\\skin.ini" 
 then 
 0AF0: 2@ = get_int_from_ini_file "cleo\\skin.ini" section "settings" key "skin" 
 gosub @SkinChange 
 end 
jump @Scan 
:SkinChange 
 wait 0 
 if and 
 player.Defined(0) 
 not actor.Dead($PLAYER_ACTOR) 
 jf @SkinChange 
 if 2@ == 1 
 then 
 09C7: change_player $PLAYER_CHAR model_to 0 
 0AF1: write_int 2@ to_ini_file "cleo\\skin.ini" section "settings" key "skin" 
 2@ = #ARMY 
 else 
 Model.Load(2@) 
 038B: load_requested_models 
 if Model.Available(2@) 
 then 
 09C7: change_player $PLAYER_CHAR model_to 2@ 
 Model.Destroy(2@) 
 0AF1: write_int 2@ to_ini_file "cleo\\skin.ini" section "settings" key "skin" 
 2@ = 1 
 end 
 end 
return
:Scan 
wait 0 
if 
0AB0: key_pressed 0x50 
jf @Scan 
 gosub @SkinChange 
 wait 100 
jump @Scan 

Published on 3 April 2014
© 2012-2024 GameModding.com All rights reserved.