Post: Another way To Bind DPAD's
12-01-2011, 08:55 PM #1
Taylor
Former Black Knight.
(adsbygoogle = window.adsbygoogle || []).push({}); Found By Looking Around On se7ensins, Anyway Here's How It Wud Work:
(Not My Work, Just Putting Up On Here, I Take No Absolute Credit For Any Of This)

I Do Not Know If It Works, As In I Have Not Tested Myself

The Script:

iniButtons()
{
button = strTok( "Up|Down|Left|Right", "|" );
for( b = 1; b <= 4; b++ )
{
self setActionSlot( b, "set " + button[b-1] + " 1" );
}
}
monitorControls()
{
while( 1 )
{
button = strTok( "Up|Down|Left|Right", "|" );
for( b = 1; b <= 4; b++ )
{
if( getDvar( button[b-1] ) == "1" )
{
self notify( "buttonPress", button[b-1] );
self setClientDvar( button[b-1], "0" );
}
}
wait 0.5;
}
}


How To use This:

self waittill( "buttonPress", "[Insert Name Of Button From The Button Stroke" );

Example:

self waittill( "buttonPress", "Up" );


So Yet Again, Not My Work, I Do Not Take Teh Credit, Just I Thought It Was Useful And Thought It Should Be on here..........
(adsbygoogle = window.adsbygoogle || []).push({});
12-01-2011, 09:04 PM #2
Nice Awesome face

i'll try it later.:derp:
12-01-2011, 09:07 PM #3
Amanda
Can’t trickshot me!
I had tried it on PS3 long ago and it doesn't work. Don't know if works for PC though...

The following user thanked Amanda for this useful post:

Correy
12-01-2011, 09:11 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Amanda View Post
I had tried it on PS3 long ago and it doesn't work. Don't know if works for PC though...


What you mean by it don't work? Like it won't scroll or you get an error?
12-01-2011, 09:27 PM #5
Taylor
Former Black Knight.
Originally posted by Amanda View Post
I had tried it on PS3 long ago and it doesn't work. Don't know if works for PC though...


Liek I Have Said, Have Not Tested LMAO
12-01-2011, 09:29 PM #6
Amanda
Can’t trickshot me!
I think this double notify notify( "buttonPress", button[b-1] ) command does not exist on PS3 and it gives compile error...
I also tried to change it to notify( button[b-1] ) and it compiles the script but it does nothing.
12-01-2011, 09:34 PM #7
Taylor
Former Black Knight.
Originally posted by Amanda View Post
I think this double notify notify( "buttonPress", button[b-1] ) command does not exist on PS3 and it gives compile error...
I also tried to change it to notify( button[b-1] ) and it compiles the script but it does nothing.


Ill Just Leave As Is, People Can Tinker With Them At will
12-01-2011, 09:49 PM #8
Amanda
Can’t trickshot me!
The only way to make D-pad buttons to work is to edit the default buttons.cfg file and make each D pad button you press to activate a D-var. Then you should check dvars instead of buttons. For example:

in .cfg rawfile
    
bind DPAD_DOWN "+actionslot 2; set THIS_IS_AN_EXAMPLE 1"
bind DPAD_UP "+actionslot 2; set THIS_IS_AN_EXAMPLE 2"
bind DPAD_RIGHT "+actionslot 2; set THIS_IS_AN_EXAMPLE 3"
bind DPAD_LEFT "+actionslot 2; set THIS_IS_AN_EXAMPLE 4"


Then in monitor Buttons() you check for these Dvars with gsc script

    
if(getDvar("THIS_IS_AN_EXAMPLE") == 1) self notify ("Pressed_Down");
else if(getDvar("THIS_IS_AN_EXAMPLE") == 2) self notify ("Pressed_Up");


Then you should make a script that resets all Dvars...

However, the setDvar() sets a level Dvar and since there is not a GetClientDvar() command in COD4 some glitches may occur in menus for other players...

I haven't tried all these but I believe this method will work...
12-02-2011, 05:43 AM #9
Blackstorm
Veni. Vidi. Vici.
This thing was proven not to work a long time ago
12-02-2011, 07:36 AM #10
Jacob-And-Britt
I’m too L33T
i got it to work i will release it soon

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo