GTA 5 Online Horn Script - Series X

Titan Two general support. Questions, firmware update, feature request.

GTA 5 Online Horn Script - Series X

Postby F40LM » Wed Apr 07, 2021 10:25 am

Can someone please help me make a horn script for GTA 5 Online, I just want L3 / Button 9 to be rapid fire at highest optimal speed for Series X
User avatar
F40LM
Staff Sergeant
Staff Sergeant
 
Posts: 13
Joined: Tue Jul 05, 2016 6:45 pm

Re: GTA 5 Online Horn Script - Series X

Postby Mad » Wed Apr 07, 2021 9:29 pm

Code: Select all
main { set_val(BUTTON_9, time_active(BUTTON_9)%100<40); }
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: GTA 5 Online Horn Script - Series X

Postby F40LM » Mon Apr 12, 2021 6:35 am

Thanks so much!
User avatar
F40LM
Staff Sergeant
Staff Sergeant
 
Posts: 13
Joined: Tue Jul 05, 2016 6:45 pm

Re: GTA 5 Online Horn Script - Series X

Postby F40LM » Mon Apr 26, 2021 7:30 am

Mad wrote:
Code: Select all
main { set_val(BUTTON_9, time_active(BUTTON_9)%100<40); }



ok so I got round to finally installing this and when I look on the monitor it shows as always being pressed without me touching the controller, could you make it so that it only activates when I hold button 9, thanks in advance!


My script looks like this


#pragma METAINFO("HORN GTA", 1, 0, "<author_name>")

main { set_val(BUTTON_9, time_active(BUTTON_9)%100<40); }
User avatar
F40LM
Staff Sergeant
Staff Sergeant
 
Posts: 13
Joined: Tue Jul 05, 2016 6:45 pm

Re: GTA 5 Online Horn Script - Series X

Postby Scachi » Mon Apr 26, 2021 7:40 am

try this:
Code: Select all
main { if (is_active(BUTTON_9)) set_val(BUTTON_9, time_active(BUTTON_9)%100<40); }

For easier timing control (more common code) you can use a combo instead:
Code: Select all
main { 
    if (is_active(BUTTON_9)) combo_run(cHorn);
}
 
combo cHorn {
    set_val(BUTTON_9, 100); wait(40); // press for 40ms
    set_val(BUTTON_9, 0); wait(60); // release for 60ms
}
 
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: GTA 5 Online Horn Script - Series X

Postby F40LM » Mon Apr 26, 2021 7:49 am

Scachi wrote:try this:
Code: Select all
main { if (is_active(BUTTON_9)) set_val(BUTTON_9, time_active(BUTTON_9)%100<40); }

For easier timing control (more common code) you can use a combo instead:
Code: Select all
main { 
    if (is_active(BUTTON_9)) combo_run(cHorn);
}
 
combo cHorn {
    set_val(BUTTON_9, 100); wait(40); // press for 40ms
    set_val(BUTTON_9, 0); wait(60); // release for 60ms
}
 


Thank you so much browie, this does exactly what I want it to do :-) and I will try to look at that creating scripts thingie too
User avatar
F40LM
Staff Sergeant
Staff Sergeant
 
Posts: 13
Joined: Tue Jul 05, 2016 6:45 pm


Return to Titan Two Device

Who is online

Users browsing this forum: Prototype and 85 guests