PDA

View Full Version : Help Activate - deactivate GPC



Danixbox
11th April 18, 08:59
excuse what command can I add in my GPC to activate and deactivate the scrip? I would like it to be with the share button and some trigger

27321.john.3159
12th April 18, 04:00
excuse what command can I add in my GPC to activate and deactivate the scrip? I would like it to be with the share button and some trigger

Here's an example.

int start_script;

main {//main start

if(get_val(PS4_SHARE) && event_press(some trigger))//some trigger
start_script=!start_script;

if(start_script)
{//script start

//put script here

}//script end

}//main end, combos start

Danixbox
12th April 18, 07:52
thank you but could you explain how it is placed if I pass my gpc?

I'm sorry, I'm new to this.

// GPC Online Library
// Instant WR Dragunov.gpc

main {
if(get_val(PS4_L2)) combo_run(Running2R);
if(get_val(PS4_R2)) combo_run(Running2L);
if(get_val(PS4_RY) < -70) combo_run(MassElbowR);
if(get_val(PS4_LY) < -70) combo_run(MassElbowL);
if(get_val(PS4_RX) <= -90)combo_run(KBD_LEFT);
if(get_val(PS4_RX) >= 90) combo_run(KBD_RIGHT);

}
combo Running2R {
set_val(PS4_RIGHT, 100);
wait (11);
wait (11);
set_val(PS4_RIGHT, 100);
wait (11);
wait (11);
set_val(PS4_RIGHT, 100);
wait (11);
set_val(PS4_TRIANGLE, 100);
wait (11);
}
combo Running2L {
set_val(PS4_LEFT, 100);
wait (11);
wait (11);
set_val(PS4_LEFT, 100);
wait (11);
wait (11);
set_val(PS4_LEFT, 100);
wait (11);
set_val(PS4_TRIANGLE, 100);
wait (11);
}
combo MassElbowL {
set_val(PS4_DOWN, 100);
wait(11);
set_val(PS4_DOWN, 100);
set_val(PS4_LEFT, 100);
wait(11);
set_val(PS4_LEFT, 100);
set_val(PS4_TRIANGLE, 100);
}
combo MassElbowR {
set_val(PS4_DOWN, 100);
wait(11);
set_val(PS4_DOWN, 100);
set_val(PS4_RIGHT, 100);
wait(11);
set_val(PS4_RIGHT, 100);
set_val(PS4_TRIANGLE, 100);
}
combo KBD_RIGHT {
set_val(PS4_RIGHT, 100);
wait(20);
set_val(PS4_RIGHT, 0);
wait(20);
set_val(PS4_RIGHT, 100);
wait(20);
set_val(PS4_RIGHT, 0);
wait(145); // edit this wait time to fine tune your dash
set_val(PS4_RIGHT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_RIGHT, 0);
set_val(PS4_DOWN, 0);
wait(20);
}
combo KBD_LEFT {
set_val(PS4_LEFT, 100);
wait(20);
set_val(PS4_LEFT, 0);
wait(20);
set_val(PS4_LEFT, 100);
wait(20);
set_val(PS4_LEFT, 0);
wait(145); // edit this wait time to fine tune your dash
set_val(PS4_LEFT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_LEFT, 0);
set_val(PS4_DOWN, 0);
wait(20);
}

27321.john.3159
14th April 18, 02:07
thank you but could you explain how it is placed if I pass my gpc?

I'm sorry, I'm new to this.

// GPC Online Library
// Instant WR Dragunov.gpc

main {
if(get_val(PS4_L2)) combo_run(Running2R);
if(get_val(PS4_R2)) combo_run(Running2L);
if(get_val(PS4_RY) < -70) combo_run(MassElbowR);
if(get_val(PS4_LY) < -70) combo_run(MassElbowL);
if(get_val(PS4_RX) <= -90)combo_run(KBD_LEFT);
if(get_val(PS4_RX) >= 90) combo_run(KBD_RIGHT);

}
combo Running2R {
set_val(PS4_RIGHT, 100);
wait (11);
wait (11);
set_val(PS4_RIGHT, 100);
wait (11);
wait (11);
set_val(PS4_RIGHT, 100);
wait (11);
set_val(PS4_TRIANGLE, 100);
wait (11);
}
combo Running2L {
set_val(PS4_LEFT, 100);
wait (11);
wait (11);
set_val(PS4_LEFT, 100);
wait (11);
wait (11);
set_val(PS4_LEFT, 100);
wait (11);
set_val(PS4_TRIANGLE, 100);
wait (11);
}
combo MassElbowL {
set_val(PS4_DOWN, 100);
wait(11);
set_val(PS4_DOWN, 100);
set_val(PS4_LEFT, 100);
wait(11);
set_val(PS4_LEFT, 100);
set_val(PS4_TRIANGLE, 100);
}
combo MassElbowR {
set_val(PS4_DOWN, 100);
wait(11);
set_val(PS4_DOWN, 100);
set_val(PS4_RIGHT, 100);
wait(11);
set_val(PS4_RIGHT, 100);
set_val(PS4_TRIANGLE, 100);
}
combo KBD_RIGHT {
set_val(PS4_RIGHT, 100);
wait(20);
set_val(PS4_RIGHT, 0);
wait(20);
set_val(PS4_RIGHT, 100);
wait(20);
set_val(PS4_RIGHT, 0);
wait(145); // edit this wait time to fine tune your dash
set_val(PS4_RIGHT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_RIGHT, 0);
set_val(PS4_DOWN, 0);
wait(20);
}
combo KBD_LEFT {
set_val(PS4_LEFT, 100);
wait(20);
set_val(PS4_LEFT, 0);
wait(20);
set_val(PS4_LEFT, 100);
wait(20);
set_val(PS4_LEFT, 0);
wait(145); // edit this wait time to fine tune your dash
set_val(PS4_LEFT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_LEFT, 0);
set_val(PS4_DOWN, 0);
wait(20);
}



int start_script;

main {

if(get_val(PS4_SHARE) && event_press(some trigger))//some trigger
start_script=!start_script;

if(start_script)
{//script start

if(get_val(PS4_L2)) combo_run(Running2R);
if(get_val(PS4_R2)) combo_run(Running2L);
if(get_val(PS4_RY) < -70) combo_run(MassElbowR);
if(get_val(PS4_LY) < -70) combo_run(MassElbowL);
if(get_val(PS4_RX) <= -90)combo_run(KBD_LEFT);
if(get_val(PS4_RX) >= 90) combo_run(KBD_RIGHT);

}//script end

}//main end, combos start

combo Running2R {
set_val(PS4_RIGHT, 100);
wait (11);
wait (11);
set_val(PS4_RIGHT, 100);
wait (11);
wait (11);
set_val(PS4_RIGHT, 100);
wait (11);
set_val(PS4_TRIANGLE, 100);
wait (11);
}
combo Running2L {
set_val(PS4_LEFT, 100);
wait (11);
wait (11);
set_val(PS4_LEFT, 100);
wait (11);
wait (11);
set_val(PS4_LEFT, 100);
wait (11);
set_val(PS4_TRIANGLE, 100);
wait (11);
}
combo MassElbowL {
set_val(PS4_DOWN, 100);
wait(11);
set_val(PS4_DOWN, 100);
set_val(PS4_LEFT, 100);
wait(11);
set_val(PS4_LEFT, 100);
set_val(PS4_TRIANGLE, 100);
}
combo MassElbowR {
set_val(PS4_DOWN, 100);
wait(11);
set_val(PS4_DOWN, 100);
set_val(PS4_RIGHT, 100);
wait(11);
set_val(PS4_RIGHT, 100);
set_val(PS4_TRIANGLE, 100);
}
combo KBD_RIGHT {
set_val(PS4_RIGHT, 100);
wait(20);
set_val(PS4_RIGHT, 0);
wait(20);
set_val(PS4_RIGHT, 100);
wait(20);
set_val(PS4_RIGHT, 0);
wait(145); // edit this wait time to fine tune your dash
set_val(PS4_RIGHT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_RIGHT, 0);
set_val(PS4_DOWN, 0);
wait(20);
}
combo KBD_LEFT {
set_val(PS4_LEFT, 100);
wait(20);
set_val(PS4_LEFT, 0);
wait(20);
set_val(PS4_LEFT, 100);
wait(20);
set_val(PS4_LEFT, 0);
wait(145); // edit this wait time to fine tune your dash
set_val(PS4_LEFT, 100);
set_val(PS4_DOWN, 100);
wait(20);
set_val(PS4_LEFT, 0);
set_val(PS4_DOWN, 0);
wait(20);
}

Danixbox
15th April 18, 11:12
thank you very much, it worked