So im tryign to give my self weapons from script but everytime i try this i just a a "struct is not an entity" error
What i have tried so far
Code Snippet
Plaintext
player GiveWeapon("ray_gun"); // Didnt think this would work // ----------------------------------------- player GiveWeapon(GetWeapon("ray_gun")); // ----------------------------------------- weapon = GetWeapon("ray_gun");
player GiveWeapon(weapon); // ----------------------------------------- #using scripts\zm\_zm_weapons;
weapon = GetWeapon("ray_gun");
player zm_weapons::weapon_give(weapon); // ----------------------------------------- #using scripts\zm\_zm_weapons;
player zm_weapons::weapon_give("ray_gun"); // ----------------------------------------- // tried all of the above but adding a SEE BELOW before them to make sure everything gets init'ed level waittill("between_round_over");
player GiveWeapon(GetWeapon("ray_gun")); // ----------------------------------------- weapon = GetWeapon("ray_gun");
player GiveWeapon(weapon);
But you will also then need to switch to it. Is that the part that is missing? Did you try switching to it?
Code Snippet
Plaintext
player SwitchToWeapon(weapon)
no im straight up not getting the weapon, when the game tries to give me the weapon it throwss a error "struct is not an entity" even if i add a SwithToWeapon() or swith weapons in game i dont get it
This worked perfectly fine until i decied i wanted to call another function and give my weapon from what function
This does not work but above does
Reason i want to split the functions up is because i want to add my gamemode mod to BO3 and for that to work i need to init the player specfic to the gamemode (calling different functions)
Spoiler: click to open...
Code Snippet
Plaintext
function pre_init() { callback::on_connect(&test_player_connect); }
youl have to bit of digging to fine where the rest is called from Double Post Merge: September 30, 2016, 08:38:43 pmWow the reason this wasnt workign was cause of a stupid typo i made in my callback system im so dumb See typo