@meimeiriver @Cyron43 I understand you gentlemen)
I agree that programming is not an easy thing. I used to work for QSP (Maybe you know what it is) until I realized that I have this little and I want more opportunities. I switched to C# and I realized that real programming is not easy. So I will study fundamental knowledge.
And sorry for the previous message. I snapped a little.(
CaTBaT
View profile on GTA5-Mods.com »
Posts made by CaTBaT
-
RE: problems with the script
-
RE: problems with the script
Sorry, but I write here to at least be something to learn and understand what mistakes I make. And not listen to " Buy a textbook, do nothing, delete MVS"
I'm downloading other scripts to see how their people were doing. Yes, I agree-you need to know basic knowledge! But I do not think that I have from basic knowledge to reduce questions about scripting for GTA V.The only normal site where at least something can be learned and then sent far away.
Zabante me here then fuck, what would I no longer had the desire or something to write here hoping to see the answer, not humiliation!And I'm not stupid enough not to set the interval.
(Didn't want to offend anyone, if offended - sorry)
-
RE: problems with the script
@meimeiriver
About Reset / Break, I do not think that much loads mod... There is also worth checking...Guard_1_FBank_1; - this is the first guard in the first Bank)
About the job to load the game - fixed now.
-
RE: problems with the script
@meimeiriver This is all that is in Tick
-
RE: problems with the script
public void OnTick(object sender, EventArgs e)
{
Reset_Bank();
BreakBank();
if (modMenuPool != null)
modMenuPool.ProcessMenus();if (Game_Start == true) { Lester_house = World.CreatePed(new Model(-1248528957), new Vector3(1272.353f, -1711.861f, 54.7f), 271.656f); Guard_1_FBank_1 = World.CreatePed(new Model(-681004504), new Vector3(1180.396f, 2709.935f, 38f), 180.239f); Guard_1_FBank_1.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_1_FBank_1.Armor = 100; Guard_2_FBank_1 = World.CreatePed(new Model(-681004504), new Vector3(1173.260f, 2704.185f, 38f), 356.066f); Guard_2_FBank_1.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_2_FBank_1.Armor = 100; Guard_3_FBank_1 = World.CreatePed(new Model(-681004504), new Vector3(1177.050f, 2702.860f, 38f), 180.184f); Guard_3_FBank_1.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_3_FBank_1.Armor = 100; Guard_1_FBank_2 = World.CreatePed(new Model(-681004504), new Vector3(149.2173f, -1036.219f, 29.3f), 343.350f); Guard_1_FBank_2.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_1_FBank_2.Armor = 100; Guard_2_FBank_2 = World.CreatePed(new Model(-681004504), new Vector3(152.821f, -1037.478f, 29.3f), 339f); Guard_2_FBank_2.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_2_FBank_2.Armor = 100; Guard_3_FBank_2 = World.CreatePed(new Model(-681004504), new Vector3(145.361f, -1037.043f, 29.3f), 227.598f); Guard_3_FBank_2.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_3_FBank_2.Armor = 100; Guard_4_FBank_2 = World.CreatePed(new Model(-681004504), new Vector3(143.938f, -1042.183f, 29.3f), 337.626f); Guard_4_FBank_2.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_4_FBank_2.Armor = 100; Guard_1_FBank_3 = World.CreatePed(new Model(-681004504), new Vector3(317.262f, -276.123f, 53.5f), 340.891f); Guard_1_FBank_3.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_1_FBank_3.Armor = 100; Guard_2_FBank_3 = World.CreatePed(new Model(-681004504), new Vector3(313.604f, -274.829f, 53.5f), 340.891f); Guard_2_FBank_3.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_2_FBank_3.Armor = 100; Guard_3_FBank_3 = World.CreatePed(new Model(-681004504), new Vector3(316.755f, -277.340f, 53.5f), 161.106f); Guard_3_FBank_3.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_3_FBank_3.Armor = 100; Guard_4_FBank_3 = World.CreatePed(new Model(-681004504), new Vector3(309.629f, -275.522f, 53.6f), 204.583f); Guard_4_FBank_3.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_4_FBank_3.Armor = 100; Guard_5_FBank_3 = World.CreatePed(new Model(-681004504), new Vector3(307.874f, -281.285f, 54.1f), 332.176f); Guard_5_FBank_3.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_5_FBank_3.Armor = 100; Guard_1_FBank_4 = World.CreatePed(new Model(-681004504), new Vector3(-348.434f, -50.491f, 49f), 39.158f); Guard_1_FBank_4.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_1_FBank_4.Armor = 100; Guard_2_FBank_4 = World.CreatePed(new Model(-681004504), new Vector3(-351.541f, -45.554f, 49f), 340.303f); Guard_2_FBank_4.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_2_FBank_4.Armor = 100; Guard_3_FBank_4 = World.CreatePed(new Model(-681004504), new Vector3(-348.157f, -46.790f, 49f), 345.439f); Guard_3_FBank_4.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_3_FBank_4.Armor = 100; Guard_4_FBank_4 = World.CreatePed(new Model(-681004504), new Vector3(-356.821f, -50.845f, 49f), 338.880f); Guard_4_FBank_4.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_4_FBank_4.Armor = 100; Guard_1_FBank_5 = World.CreatePed(new Model(-681004504), new Vector3(-1200.889f, -338.232f, 38f), 296.456f); Guard_1_FBank_5.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_1_FBank_5.Armor = 100; Guard_2_FBank_5 = World.CreatePed(new Model(-681004504), new Vector3(-1213.272f, -324.790f, 37.5f), 26.113f); Guard_2_FBank_5.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_2_FBank_5.Armor = 100; Guard_3_FBank_5 = World.CreatePed(new Model(-681004504), new Vector3(-1217.196f, -326.748f, 37.6f), 28.302f); Guard_3_FBank_5.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_3_FBank_5.Armor = 100; Guard_4_FBank_5 = World.CreatePed(new Model(-681004504), new Vector3(-1210.193f, -329.307f, 37.5f), 60.580f); Guard_4_FBank_5.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_4_FBank_5.Armor = 100; Guard_5_FBank_5 = World.CreatePed(new Model(-681004504), new Vector3(-1218.618f, -331.537f, 37.5f), 258.531f); Guard_5_FBank_5.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_5_FBank_5.Armor = 100; Guard_6_FBank_5 = World.CreatePed(new Model(-681004504), new Vector3(-1215.956f, -335.951f, 37.5f), 26.263f); Guard_6_FBank_5.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_6_FBank_5.Armor = 100; Guard_1_FBank_6 = World.CreatePed(new Model(-681004504), new Vector3(-2959.483f, 477.623f, 15f), 78.392f); Guard_1_FBank_6.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_1_FBank_6.Armor = 100; Guard_2_FBank_6 = World.CreatePed(new Model(-681004504), new Vector3(-2964.647f, 477.548f, 15f), 307.220f); Guard_2_FBank_6.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_2_FBank_6.Armor = 100; Guard_3_FBank_6 = World.CreatePed(new Model(-681004504), new Vector3(-2962.485f, 485.734f, 15f), 141.384f); Guard_3_FBank_6.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_3_FBank_6.Armor = 100; Guard_4_FBank_6 = World.CreatePed(new Model(-681004504), new Vector3(-2964.963f, 484.798f, 15f), 271.7f); Guard_4_FBank_6.Weapons.Give(WeaponHash.Pistol, 9999, true, true); Guard_4_FBank_6.Armor = 100; Guard_5_FBank_6 = World.CreatePed(new Model(-681004504), new Vector3(-2967.635f, 480.277f, 15f), 84.126f); Guard_5_FBank_6.Weapons.Give(WeaponHash.PumpShotgun, 9999, true, true); Guard_5_FBank_6.Armor = 100; PedGroup Group_1 = Guard_1_FBank_1.CurrentPedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_2_FBank_1, Group_1); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_3_FBank_1, Group_1); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_1_FBank_1, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_2_FBank_1, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_3_FBank_1, 100); PedGroup Group_2 = Guard_1_FBank_2.CurrentPedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_2_FBank_2, Group_2); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_3_FBank_2, Group_2); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_4_FBank_2, Group_2); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_1_FBank_2, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_2_FBank_2, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_3_FBank_2, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_4_FBank_2, 100); PedGroup Group_3 = Guard_1_FBank_3.CurrentPedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_2_FBank_3, Group_3); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_3_FBank_3, Group_3); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_4_FBank_3, Group_3); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_5_FBank_3, Group_3); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_1_FBank_3, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_2_FBank_3, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_3_FBank_3, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_4_FBank_3, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_5_FBank_3, 100); PedGroup Group_4 = Guard_1_FBank_4.CurrentPedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_2_FBank_4, Group_4); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_3_FBank_4, Group_4); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_4_FBank_4, Group_4); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_1_FBank_4, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_2_FBank_4, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_3_FBank_4, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_4_FBank_4, 100); PedGroup Group_5 = Guard_1_FBank_5.CurrentPedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_2_FBank_5, Group_5); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_3_FBank_5, Group_5); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_4_FBank_5, Group_5); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_5_FBank_5, Group_5); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_6_FBank_5, Group_5); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_1_FBank_5, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_2_FBank_5, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_3_FBank_5, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_4_FBank_5, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_5_FBank_5, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_6_FBank_5, 100); PedGroup Group_6 = Guard_1_FBank_6.CurrentPedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_2_FBank_6, Group_6); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_3_FBank_6, Group_6); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_4_FBank_6, Group_6); Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, Guard_5_FBank_6, Group_6); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_1_FBank_6, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_2_FBank_6, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_3_FBank_6, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_4_FBank_6, 100); Function.Call(Hash.SET_PED_COMBAT_ABILITY, Guard_5_FBank_6, 100); Game_Start = false; } if (Robbery == true && Game.Player.WantedLevel < 1 && Game.Player.IsAlive) { Game.Player.Money += Money_robbery; Money_robbery = 0; Robbery = false; } if (Auto_Take == true) { Take_weed += 1; Inventore_Player.MenuItems.Remove(Weed); Weed = new UIMenuItem("Травка " + Take_weed + " Шт"); Inventore_Player.AddItem(Weed); Game.Player.Character.Task.PlayAnimation("mp_common", "givetake1_b", 8f, -1, (AnimationFlags)16); Script.Wait(3000); UI.Notify("+ ~g~1 ~w~Травка"); UI.Notify("Собрано ~g~" + Take_weed + "~w~ Травки"); } if (Auto_Create == true) { Take_weed -= 2; Lite_Nark += 1; Inventore_Player.MenuItems.Remove(Lite_Narko); Lite_Narko = new UIMenuItem("Упаковка с травкой " + Lite_Nark + " Шт"); Inventore_Player.AddItem(Lite_Narko); Inventore_Player.MenuItems.Remove(Weed); Weed = new UIMenuItem("Травка " + Take_weed + " Шт"); Inventore_Player.AddItem(Weed); Game.Player.Character.Task.PlayAnimation("mp_common", "givetake1_b", 8f, -1, (AnimationFlags)16); UI.Notify("~r~-2 ~w~Травки"); UI.Notify("~g~+ 1 ~w~Упаковка травки"); Script.Wait(3000); } if (World.GetDistance(Game.Player.Character.Position, Create_Weed) < 3f && Take_weed < 1) { Auto_Create = false; toolTip("Не хватает травки."); } if (Take_weed < 1) { Inventore_Player.MenuItems.Remove(Weed); } if (Lite_Nark < 1) { Inventore_Player.MenuItems.Remove(Lite_Narko); } if (Game.Player.IsDead && Robbery == true) { Money_robbery = 0; Break = false; BreakBank_ = false; Robbery = false; Haker_Time = 0; UI.Notify("Вы не смогли ограбить банк"); } if (Robbery == false) { if (FBankRobb_1 == false) { World.DrawMarker((MarkerType)(1), new Vector3(1176.451f, 2711.695f, 37.1f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (FBankRobb_2 == false) { World.DrawMarker((MarkerType)(1), new Vector3(146.9535f, -1044.909f, 28.3f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (FBankRobb_3 == false) { World.DrawMarker((MarkerType)(1), new Vector3(311.004f, -283.291f, 53.2f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (FBankRobb_4 == false) { World.DrawMarker((MarkerType)(1), new Vector3(-354.004f, -54.089f, 48.1f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (FBankRobb_5 == false) { World.DrawMarker((MarkerType)(1), new Vector3(-1212.02f, -335.962f, 36.8f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (FBankRobb_6 == false) { World.DrawMarker((MarkerType)(1), new Vector3(-2957.715f, 481.120f, 14.8f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } } if (Robbery == true) { if (BreakSuskeful == true) { World.DrawMarker((MarkerType)(1), new Vector3(1176.451f, 2711.695f, 37.1f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (BreakSuskeful == true) { World.DrawMarker((MarkerType)(1), new Vector3(146.9535f, -1044.909f, 28.3f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (BreakSuskeful == true) { World.DrawMarker((MarkerType)(1), new Vector3(311.004f, -283.291f, 53.2f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (BreakSuskeful == true) { World.DrawMarker((MarkerType)(1), new Vector3(-354.004f, -54.089f, 48.1f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (BreakSuskeful == true) { World.DrawMarker((MarkerType)(1), new Vector3(-1212.02f, -335.962f, 36.8f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } if (BreakSuskeful == true) { World.DrawMarker((MarkerType)(1), new Vector3(-2957.715f, 481.120f, 14.8f), Vector3.Zero, Vector3.Zero, new Vector3(1.5f, 1.5f, 0.3f), Color.Green); } } World.DrawMarker((MarkerType)(1), Weed_Farm, Vector3.Zero, Vector3.Zero, new Vector3(2f, 2f, 0.7f), Color.DarkGreen); World.DrawMarker((MarkerType)(1), Create_Weed, Vector3.Zero, Vector3.Zero, new Vector3(2f, 2f, 0.7f), Color.Red); }
-
RE: problems with the script
@Cyron43 I don't mean to be a fool, but kind of NullReferenceException - throws an exception for null. the only null I have in tick is - if (ModMenuPool != null) { ModMenuPool.ProcessMenus(); }
-
RE: problems with the script
@Cyron43 Not the first, I do for myself scenarios (I study), but here is a problem first encountered
-
RE: problems with the script
@Cyron43
And code I cannot send. There are more characters than you are allowed to write in the message) -
RE: problems with the script
@Cyron43
ScriptHookVDotNet2.log:[23:21:11] [DEBUG] Created script domain 'ScriptDomain_7F54E7BD' with v2.10.6.
[23:21:11] [DEBUG] Loading scripts from 'F:\Games\Grand Theft Auto V\scripts' into script domain 'ScriptDomain_7F54E7BD' ...
[23:21:11] [INFO] Loading assembly 'ClassLibrary2.dll' ...
[23:21:11] [DEBUG] Found 1 script(s) in 'ClassLibrary2.dll'.
[23:21:11] [INFO] Loading assembly 'NativeUI.dll' ...
[23:21:11] [DEBUG] Found 1 script(s) in 'NativeUI.dll'.
[23:21:11] [INFO] Loading assembly 'NativeUI.dll' ...
[23:21:11] [DEBUG] Found 1 script(s) in 'NativeUI.dll'.
[23:21:11] [DEBUG] Starting 3 script(s) ...
[23:21:11] [DEBUG] Instantiating script 'RpGaming.BankRobbery' in script domain 'ScriptDomain_7F54E7BD' ...
[23:21:11] [DEBUG] Started script 'RpGaming.BankRobbery'.
[23:21:11] [DEBUG] Instantiating script 'NativeUI.BigMessageThread' in script domain 'ScriptDomain_7F54E7BD' ...
[23:21:11] [DEBUG] Started script 'NativeUI.BigMessageThread'.
[23:21:11] [DEBUG] Instantiating script 'NativeUI.BigMessageThread' in script domain 'ScriptDomain_7F54E7BD' ...
[23:21:11] [DEBUG] Started script 'NativeUI.BigMessageThread'.
[23:21:12] [ERROR] Caught fatal unhandled exception:
System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в RpGaming.BankRobbery.OnTick(Object sender, EventArgs e)
в GTA.Script.raise_Tick(Object value0, EventArgs value1)
в GTA.Script.MainLoop() -
problems with the script
In the error script 0. Nothing happens in the game...
Blips appear, Peds respawn either with the first or with the second restart of the script. Markers do not appear and ModMenu does not open...
Here is the link to Yandex.disk file, can anyone see what is wrong(https://yadi.sk/d/hLMDttMV3W6D6L). I just don't understand anymore.