double pump key change

Ask gaming related questions
ikiv6
Posts: 1
Joined: 11 Jun 2018, 14:41

double pump key change

11 Jun 2018, 14:47

hey guys i found this awesome fast script for double pump but there is one problem for me , i just want it to swap numbers 2 and 3 instead of wheel up and wheel down cause sometimes it swap to the wrong weapon , thanks in advance
here is the code

Code: Select all

    key_shoot:="LButton"
    key_pompe_chasseur:="F1"
    key_shotgun:="F2"
    key_heavy_sg:="F3"
    key_Terminate:="Tab"

    STATE:=0

    loop {
        sleep 1 
        if GetKeyState(key_pompe_chasseur)
        {
            pompechasseur:=true 
            shotgun:=false
            heavy_shotgun:=false
        }   
        if GetKeyState(key_shotgun)
        {
            pompechasseur:=false    
            shotgun:= true
            heavy_shotgun:=false
        }   
        if GetKeyState(key_heavy_sg)
        {
            pompechasseur:= false   
            shotgun:= false
            heavy_shotgun:=true
        }   
        if GetKeyState(key_Terminate)
        {
            pompechasseur:= false   
            shotgun:= false
            heavy_shotgun:=false
            STATE:=0
        }   
        if GetKeyState(key_shoot)
        {       
            if (pompechasseur = true)
            {
                if (STATE = 1)
                {
                    STATE:=0
                    click WheelUp
                    Sleep 725
                }else{
                    STATE:=1
                    click WheelDown
                    Sleep 725
                }
            }       
            if (shotgun = true)
            {
                if (STATE = 1)
                {
                    STATE:=0
                    click WheelUp
                    Sleep 600
                }else{
                    STATE:=1
                    click WheelDown
                    Sleep 600
                }
            }       
            if (heavy_shotgun = true)
            {
                if (STATE = 1)
                {
                    STATE:=0
                    click WheelUp
                    Sleep 605                   
                }
                else
                {
                    STATE:=1
                    click WheelDown
                    Sleep 605           
                }
            }       
        }
    }

 
Rohwedder
Posts: 1370
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: double pump key change

14 Jun 2018, 09:12

Hallo,
only a try (I don't know the play):

Code: Select all

key_shoot:="LButton"
key_pompe_chasseur:="F1"
key_shotgun:="F2"
key_heavy_sg:="F3"
key_Terminate:="Tab"
STATE:=0
loop
{
	sleep 1
	if GetKeyState(key_pompe_chasseur)
	{
		pompechasseur:=true
		shotgun:=false
		heavy_shotgun:=false
	}
	if GetKeyState(key_shotgun)
	{
		pompechasseur:=false
		shotgun:= true
		heavy_shotgun:=false
	}
	if GetKeyState(key_heavy_sg)
	{
		pompechasseur:= false
		shotgun:= false
		heavy_shotgun:=true
	}
	if GetKeyState(key_Terminate)
	{
		pompechasseur:= false
		shotgun:= false
		heavy_shotgun:=false
		STATE:=0
	}
	if GetKeyState(key_shoot)
	{
		if (pompechasseur = true)
		{
			if (STATE = 1)
			{
				STATE:=0
				SendInput 2 ;click WheelUp
				Sleep 725
			}
			else
			{
				STATE:=1
				SendInput 3 ;click WheelDown
				Sleep 725
			}
		}
		if (shotgun = true)
		{
			if (STATE = 1)
			{
				STATE:=0
				SendInput 2 ;click WheelUp
				Sleep 600
			}
			else
			{
				STATE:=1
				SendInput 3 ;click WheelDown
				Sleep 600
			}
		}
		if (heavy_shotgun = true)
		{
			if (STATE = 1)
			{
				STATE:=0
				SendInput 2 ;click WheelUp
				Sleep 605
			}
			else
			{
				STATE:=1
				SendInput 3 ;click WheelDown
				Sleep 605
			}
		}
	}
}

Return to “Gaming”

Who is online

Users browsing this forum: Google [Bot], jeeswg, swagfag and 10 guests