Post: [REQUEST] Need button handling
06-28-2011, 04:59 AM #1
pcfreak30
>> PCFreak30.com Happy<<
(adsbygoogle = window.adsbygoogle || []).push({}); Hello. So far i have ported my mod menu to COD4. Though the functions:


  • attackbuttonpressed
  • adsbuttonpressed
  • usebuttonpressed
  • meleebuttonpressed


either don't work well or cod has really crappy ram as i have heard.


Can anyone tell me of any ways to listen for input besides

    self waittill( "begin_firing" );



    self waittill( "sprint_begin" );


and

    self waittill( "weapon_change");


All my other ideas for handling have blown up in my face...

BTW once this gets to COD4, I am porting to COD5 Smile.

Thanks Smile..
(adsbygoogle = window.adsbygoogle || []).push({});
06-28-2011, 09:29 PM #2
Karoolus
I'm the W@W Menu Guy !
self waittill("action_notify_melee");
but that's self MeleeButtonPressed(); :p

you can use the dpad as well, i'll look up the code..

---------- Post added at 11:29 PM ---------- Previous post was at 11:26 PM ----------


    startDpad()
{
wait 1;
self.curweap = "deserteaglegold_mp"; /*you do NOT have to use the gold deagle here, but you should use a pistol so it doesnt take forever in between switching weapons*/
self giveweapon("deserteaglegold_mp"; //make sure this matches self.curweap
wait 0.05;
self switchtoweapon("deserteaglegold_mp");
self SetActionSlot( 1, "weapon","usp_mp" );
self SetActionSlot( 2, "weapon", "c4_mp" );
self SetActionSlot( 3, "weapon","deserteagle_mp" );
self SetActionSlot( 4, "weapon","claymore_mp" );
self giveweapon("claymore_mp");
self giveweapon("c4_mp");
self giveweapon("usp_mp");
self giveweapon("deserteagle_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="deserteagle_mp"){
self notify("Left");
self TakeWeapon( "deserteagle_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("deserteagle_mp");
wait 0.35;
}else if(self getCurrentWeapon()=="claymore_mp"){
self notify("Right");
self TakeWeapon( "claymore_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("claymore_mp");
wait 0.35;
}else if(self getCurrentWeapon()=="usp_mp"){
self notify("Up");
self TakeWeapon( "usp_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("usp_mp");
wait 0.35;
}else if(self getCurrentWeapon()=="c4_mp"){
self notify("Down");
self TakeWeapon( "c4_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("c4_mp");
wait 0.3;
}
wait 0.05;
}
}


Credit to dudeeitsbrian from se7
there's a COD5 version as well if you want it Winky Winky

my shortened version:
    InitDpad()
{
self.curweap = "deserteaglegold_mp";
self giveweapon(self.curweap);
wait 0.05;
self switchtoweapon(self.curweap);
self SetActionSlot( 1, "weapon","usp_mp" );
self SetActionSlot( 2, "weapon", "c4_mp" );
self SetActionSlot( 3, "weapon","deserteagle_mp" );
self SetActionSlot( 4, "weapon","claymore_mp" );
self giveweapon("claymore_mp");
self giveweapon("c4_mp");
self giveweapon("usp_mp");
self giveweapon("deserteagle_mp");
self thread monitorDpad();
}

monitorDpad()
{
self endon ( "disconnect" );
self endon ( "death" );
for(;Winky Winky
{
self waittill("weapon_change");
switch( self GetCurrentWeapon())
{
case "deserteagle_mp":
self thread HandleDpad("deserteagle_mp","left");
break;
case "claymore_mp":
self thread HandleDpad("claymore_mp","right");
break;
case "usp_mp":
self thread HandleDpad("usp_mp","up");
break;
case "c4_mp":
self thread HandleDpad("c4_mp","down");
break;
}
wait 0.05;
}
}


HandleDpad( weapon, button)
{
self notify( button );
self TakeWeapon( weapon);
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon( weapon );
wait 0.3;
}

The following user thanked Karoolus for this useful post:

.Andy
06-30-2011, 09:25 PM #3
BlazingDope
Can’t trickshot me!
Originally posted by pcfreak30 View Post
Hello. So far i have ported my mod menu to COD4. Though the functions:


  • attackbuttonpressed
  • adsbuttonpressed
  • usebuttonpressed
  • meleebuttonpressed


either don't work well or cod has really crappy ram as i have heard.


Can anyone tell me of any ways to listen for input besides

    self waittill( "begin_firing" );



    self waittill( "sprint_begin" );


and

    self waittill( "weapon_change");


All my other ideas for handling have blown up in my face...

BTW once this gets to COD4, I am porting to COD5 Smile.

Thanks Smile..



what would weapon reload be ? weapon_usereload, I'm working on my menu patch and I can't get the square button working :/

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo