07-02-2011, 20:48
Pages: 1 2
07-02-2011, 20:51
forwardbuttonpressed is undefined, I think you want to know if someone is walking forward .. which afaik is not possible without checking his coordinates.
07-02-2011, 20:55
change it to if(usebuttonpressed())
07-02-2011, 22:15
(07-02-2011, 20:55)OrangePL Wrote: [ -> ]change it to if(usebuttonpressed())
thanks man
07-03-2011, 00:09
Sorry guys i got another problem
Black Ops sais there is a syntax error, everytime i have those 4 options "else if", if you know what i mean.
The 4 options proberly can't start with "else if"
You guys have any idea how to fix this and still have only 1 choice per spawn?
Black Ops sais there is a syntax error, everytime i have those 4 options "else if", if you know what i mean.
The 4 options proberly can't start with "else if"
You guys have any idea how to fix this and still have only 1 choice per spawn?
Code:
classmenu()
{
else if ( !self ButtonPressed( "+actionslot 1" ) )
{
self takeAllWeapons();
self giveWeapon("tesla_gun_zm");
self giveWeapon("stg44_sp");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveWeapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( !self ButtonPressed( "+actionslot 2" ) )
{
self takeAllWeapons();
self giveWeapon("thundergun_zm");
self giveWeapon("ppsh_sp");
self setPerk("specialty_twogrenades");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveweapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( !self ButtonPressed( "+actionslot 3" ) )
{
self takeAllWeapons();
self giveWeapon("ray_gun_zm");
self giveWeapon("sten_sp");
self setPerk("specialty_twogrenades");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveweapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( !self ButtonPressed( "+actionslot 4" ) )
{
self takeAllWeapons();
self giveWeapon("m16_acog_gl_extclip_mp");
self giveWeapon("commando_ir_mk_dualclip_silencer_mp");
self giveWeapon("l96a1_vzoom_extclip_mp");
self giveWeapon("cz75_upgradesight_extclip_silencer_mp");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("concussion_grenade_mp");
self giveWeapon("satchel_charge_mp");
self giveWeapon("knife_mp");
self setPerk("specialty_scavenger");
self setPerk("specialty_extraammo");
self setPerk("specialty_fastreload");
self setPerk("specialty_fastads");
self setPerk("specialty_gas_mask");
self setPerk("specialty_showonradar");
self setPerk("specialty_stunprotection");
}
}
07-03-2011, 11:09
You don't need the else if at start, only the if
07-03-2011, 11:40
(07-03-2011, 11:09)Opel Wrote: [ -> ]You don't need the else if at start, only the if
that gets rid of the bad syntax,
but then it automaticly gives me the last class.
And i want to be able to choose one at spawn.
07-03-2011, 15:21
Well try removing the ! from the conditions as you are saying
etc
Code:
if ( !self ButtonPressed( "+actionslot 1" ) )
if the actionslot button isnt pressed,
07-03-2011, 15:36
Code:
classmenu()
{
if ( self ButtonPressed( "+actionslot 1" ) )
{
self takeAllWeapons();
self giveWeapon("tesla_gun_zm");
self giveWeapon("stg44_sp");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveWeapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( self ButtonPressed( "+actionslot 2" ) )
{
self takeAllWeapons();
self giveWeapon("thundergun_zm");
self giveWeapon("ppsh_sp");
self setPerk("specialty_twogrenades");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveweapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( self ButtonPressed( "+actionslot 3" ) )
{
self takeAllWeapons();
self giveWeapon("ray_gun_zm");
self giveWeapon("sten_sp");
self setPerk("specialty_twogrenades");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveweapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( self ButtonPressed( "+actionslot 4" ) )
{
self takeAllWeapons();
self giveWeapon("m16_acog_gl_extclip_mp");
self giveWeapon("commando_ir_mk_dualclip_silencer_mp");
self giveWeapon("l96a1_vzoom_extclip_mp");
self giveWeapon("cz75_upgradesight_extclip_silencer_mp");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("concussion_grenade_mp");
self giveWeapon("satchel_charge_mp");
self giveWeapon("knife_mp");
self setPerk("specialty_scavenger");
self setPerk("specialty_extraammo");
self setPerk("specialty_fastreload");
self setPerk("specialty_fastads");
self setPerk("specialty_gas_mask");
self setPerk("specialty_showonradar");
self setPerk("specialty_stunprotection");
}
}
07-03-2011, 16:29
(07-03-2011, 15:36)koil Wrote: [ -> ]Code:classmenu()
{
if ( self ButtonPressed( "+actionslot 1" ) )
{
self takeAllWeapons();
self giveWeapon("tesla_gun_zm");
self giveWeapon("stg44_sp");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveWeapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( self ButtonPressed( "+actionslot 2" ) )
{
self takeAllWeapons();
self giveWeapon("thundergun_zm");
self giveWeapon("ppsh_sp");
self setPerk("specialty_twogrenades");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveweapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( self ButtonPressed( "+actionslot 3" ) )
{
self takeAllWeapons();
self giveWeapon("ray_gun_zm");
self giveWeapon("sten_sp");
self setPerk("specialty_twogrenades");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("tabun_gas_mp");
self giveweapon("knife_mp");
self setPerk("specialty_movefaster");
self setPerk("specialty_fallheight");
self setPerk("specialty_longersprint");
self setPerk("specialty_unlimitedsprint");
}
else if ( self ButtonPressed( "+actionslot 4" ) )
{
self takeAllWeapons();
self giveWeapon("m16_acog_gl_extclip_mp");
self giveWeapon("commando_ir_mk_dualclip_silencer_mp");
self giveWeapon("l96a1_vzoom_extclip_mp");
self giveWeapon("cz75_upgradesight_extclip_silencer_mp");
self giveWeapon("sticky_grenade_mp");
self giveWeapon("concussion_grenade_mp");
self giveWeapon("satchel_charge_mp");
self giveWeapon("knife_mp");
self setPerk("specialty_scavenger");
self setPerk("specialty_extraammo");
self setPerk("specialty_fastreload");
self setPerk("specialty_fastads");
self setPerk("specialty_gas_mask");
self setPerk("specialty_showonradar");
self setPerk("specialty_stunprotection");
}
}
Ok that gets rid of the bad syntax, thanks.
but when i press one of those buttons nothing happens.
any idea?
Pages: 1 2