Ik probeer een mod te maken waarbij je via een menu een aantal "classes" kan kiezen. Dit doe ik omdat ik een hekel heb aan 20 verschillende soorten overbodige wapens.
Maar het menu komt niet tevoorschijn:
{$CLEO .cs}
// Load models
0247: load_model #SNIPER
0247: load_model #M4
0247: load_model #KNIFECUR
0247: load_model #SILENCED
0247: load_model #DESERT_EAGLE
0247: load_model #SHOTGSPA
0247: load_model #MINIGUN
0247: load_model #GRENADE
0247: load_model #ROCKETLA
0247: load_model #MOLOTOV
0247: load_model #MP5LNG
0247: load_model #IRGOGGLES
0247: load_model #SATCHEL
038B: load_requested_models
:MODEL_LOAD
00D6: if or
8248: not model #SNIPER available
8248: not model #M4 available
8248: not model #KNIFECUR available
8248: not model #SILENCED available
8248: not model #DESERT_EAGLE available
8248: not model #SHOTGSPA available
8248: not model #MINIGUN available
004D: jump_if_false @MODEL_LOAD2
0001: wait 0 ms
0002: jump @MODEL_LOAD
:MODEL_LOAD2
00D6: if or
8248: not model #GRENADE available
8248: not model #ROCKETLA available
8248: not model #MOLOTOV available
8248: not model #MP5LNG available
8248: not model #IRGOGGLES available
8248: not model #SATCHEL available
004D: jump_if_false @MODEL_SPAWN
0001: wait 0 ms
0002: jump @MODEL_LOAD
//Sniper
//Sniper M4 knife Silenced
//Sniper 2
//Sniper Deagle Shotgun Knife
//Destroy
//Minigun Grenade M4 Combat
//Destroy 2
//HSRocket Molotov M4 Combat
//Soldier
//Knife Deagle SMG M4
//Sniper 3
//Thermal Satchel Sniper Silenced Knife
:MODEL_SPAWN
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 57 //9
jf @MODEL_SPAWN
08D4: $Classes = create_panel_with_title 'Class' position 29.0 145.0 width 220.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $Classes column 0 header 'Class' data 'Sniper1' 'Sniper2' 'Sniper3' 'Destroy1' 'Destroy2' 'Soldier' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
repeat
wait 0 ms
if 00E1: player 0 pressed_key 15
then
08DA: remove_panel $Classes
03E6: remove text box
jump @END
end
until 00E1: player 0 pressed_key 16
08D7: $choice = panel $Classes active_row
08DA: remove_panel $Classes
03E6: remove text box
if $choice == 0
then
048F: actor $PLAYER_ACTOR remove_weapons
01B2: give_actor $PLAYER_ACTOR weapon 34 ammo 150 // Sniper
01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 500 // M4
01B2: give_actor $PLAYER_ACTOR weapon 4 ammo 1 // Knife
01B2: give_actor $PLAYER_ACTOR weapon 23 ammo 200 // Silenced
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
end
if $choice == 1
then
048F: actor $PLAYER_ACTOR remove_weapons
01B2: give_actor $PLAYER_ACTOR weapon 34 ammo 150 // Sniper
01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 200 // Deagle
01B2: give_actor $PLAYER_ACTOR weapon 4 ammo 1 // Knife
01B2: give_actor $PLAYER_ACTOR weapon 27 ammo 100 // Combat Shotgun
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
end
if $choice == 2
then
048F: actor $PLAYER_ACTOR remove_weapons
01B2: give_actor $PLAYER_ACTOR weapon 34 ammo 150 // Sniper
01B2: give_actor $PLAYER_ACTOR weapon 23 ammo 200 // Silenced
01B2: give_actor $PLAYER_ACTOR weapon 4 ammo 1 // Knife
01B2: give_actor $PLAYER_ACTOR weapon 39 ammo 25 // Satchel
01B2: give_actor $PLAYER_ACTOR weapon 45 ammo 1 // Thermal
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
end
if $choice == 3
then
048F: actor $PLAYER_ACTOR remove_weapons
01B2: give_actor $PLAYER_ACTOR weapon 38 ammo 800 // Minigun
01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 500 // M4
01B2: give_actor $PLAYER_ACTOR weapon 27 ammo 100 // Combat
01B2: give_actor $PLAYER_ACTOR weapon 16 ammo 50 // Grenade
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 38
end
if $choice == 4
then
048F: actor $PLAYER_ACTOR remove_weapons
01B2: give_actor $PLAYER_ACTOR weapon 36 ammo 50 // HSR
01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 500 // M4
01B2: give_actor $PLAYER_ACTOR weapon 27 ammo 100 // Combat
01B2: give_actor $PLAYER_ACTOR weapon 18 ammo 50 // Molotov
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 36
end
if $choice == 5
then
048F: actor $PLAYER_ACTOR remove_weapons
01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 500 // M4
01B2: give_actor $PLAYER_ACTOR weapon 29 ammo 500 // SMG
01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 200 // Deagle
01B2: give_actor $PLAYER_ACTOR weapon 4 ammo 1 // Knife
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
end
:END
wait 1000
jump @END
0A93: end_custom_thread
Ik probeer een mod te maken waarbij je via een menu een aantal "classes" kan kiezen. Dit doe ik omdat ik een hekel heb aan 20 verschillende soorten overbodige wapens.
Maar het menu komt niet tevoorschijn: