Ho scaricato un template e piano piano l'ho riempito
Però ora sono a un vicolo cieco:vorrei fare in modo che il tasto per attivare e disattivare lo script sia lo stesso e che basti premere il tasto la prima volta per attivarlo e la seconda per disattivarlo(mentre ora devo tenerlo premuto).Vorrei anche farlo funzionare con il controller
Questo è il codice
using GTA; using GTA.Native; using GTA.Math; using System; using System.Windows.Forms; using System.Collections.Generic; using System.IO; using System.Drawing; using System.Media; public class Test : Script { private Ped playerPed = Game.Player.Character; private Player player = Game.Player; public Test() { Tick += OnTick; KeyDown += onkeydown; KeyUp += onkeyup; } private void OnTick(object sender, EventArgs e) { if (Function.Call<bool>(Hash.IS_CONTROL_PRESSED, Game.Player.Character)) { Function.Call(Hash._SET_RADAR_BIGMAP_ENABLED, 1, 0); { }}} private void onkeydown(object sender, KeyEventArgs e) { { if (e.KeyCode == Keys.Z) { Function.Call(Hash._SET_RADAR_BIGMAP_ENABLED, 1, 0); } }} private void onkeyup(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Z) { Function.Call(Hash._SET_RADAR_BIGMAP_ENABLED, 0, 0); } }}
Messaggio modificato da Alex106 il 04 ottobre 2016 - 08:47