Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Unlimited Tactical grenades isnt working :/
#1
Sad 
Hey everybody! I've been coding a Dodgeball mod for the past day or two, and i've gotten almost everything done. I just need to find a way to get unlimited ammo. Ive tried about four different scripts and nothing will work.

The current script im using is:

Code:
doAmmo()
{
self giveMaxAmmo("flash_grenade_mp");

    while(self getCurrentWeapon() != "flash_grenade_mp")
        {
        self switchToWeapon("flash_grenade_mp");
        wait 0.05;
        }
}
I have also used:
Code:
doAmmo()
{
   self endon ( "death" );
   self endon ( "disconnect" );
  
   for ( ;; )
   {
      wait( 0.1 );
      
      weapon = self GetCurrentWeapon();
      
      self GiveMaxAmmo( weapon );
      
      clipAmmo = 999;
      
      self SetWeaponAmmoClip( weapon, clipAmmo );
   }
}

And this one:
Code:
UnlimitedAmmo()
{
   self endon ( "death" );
   self endon ( "disconnect" );
  
   for ( ;; )
   {
      clipAmmo = 999;
      stockAmmo = 999;
      weapon = self GetCurrentWeapon();
      
      self SetWeaponAmmoClip( weapon, clipAmmo );
      self SetWeaponAmmoStock( weapon, stockAmmo );
   }
}

Nothing works. Can somebody point out what i'm doing wrong? Will i need to post all of my code or will just the above scripts be sufficient?

Thank you in advance!
Reply

#2
Deja vu form a post not so long ago in a easy to perfom , search just replace with your weapon of chouse
(05-22-2011, 12:07)rotceh_dnih Wrote: hmmm

on player spawned
Code:
self thread unlimitedAmmo( 99, "hatchet_mp" );

anywhere
Code:
unlimitedAmmo( ammo, weapon )
{
self endon( "disconnect" );
for(;;)
{
self setWeaponAmmoClip( weapon, ammo );
wait 0.05;
}
}
and self give the toma aswell
also im not sure hatchet_mp is right "im 99% sure" but yea that is how you would set ammo atm as the dvar for unlimited ammo is locked as far as i know xD
Reply

#3
(06-02-2011, 18:01)rotceh_dnih Wrote: Deja vu form a not so long ago ,easy to perfom , search
(05-22-2011, 12:07)rotceh_dnih Wrote: hmmm

on player spawned
Code:
self thread unlimitedAmmo( 99, "hatchet_mp" );

anywhere
Code:
unlimitedAmmo( ammo, weapon )
{
self endon( "disconnect" );
for(;;)
{
self setWeaponAmmoClip( weapon, ammo );
wait 0.05;
}
}
and self give the toma aswell
also im not sure hatchet_mp is right "im 99% sure" but yea that is how you would set ammo atm as the dvar for unlimited ammo is locked as far as i know xD
Whoops, forgot to say i used this one too. :p my bad.

This code gave me a bad syntax. Ran it through GSChecker, it said it was clean.
Reply

#4
really its just coz im again 99% sure it will work xD as i tested it the other day but i do belive something could have changed, as we are going through a update ,when its finished and i wake up i'll re check
Reply

#5
(06-02-2011, 18:12)rotceh_dnih Wrote: really its just coz im again 99% sure it will work xD as i tested it the other day but i do belive something could have changed, as we are going through a update ,when its finished and i wake up i'll re check

Okay, i appreciate the help.

And, just to test, i commented out calling the thread and the thread itself and it loaded without problems. I removed the comment // and /* markers and it gave me a bad syntax again.

Maybe I just copied it over wrong, ill try again.

EDIT: Okay, i did a complete copy-paste. Didnt change a thing and it gave a "Unknown Function".
-_- Im starting to think BO doesnt like me.
MW2 was a lot easier to code GSC's for. Or atleast I was luckier with my MW2 mods just working :p
Reply

#6
Code:
self SetOffhandSecondaryClass( "smoke" );

Set this or you won't be able to give other tactical grenades than flashes (set to "flash" in which case)

and no, don't set it to "willy_pete" or "stun" or "concussion", smoke counts for all.
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#7
(06-02-2011, 18:24)AZUMIKKEL Wrote:
Code:
self SetOffhandSecondaryClass( "smoke" );

Set this or you won't be able to give other tactical grenades than flashes (set to "flash" in which case)

and no, don't set it to "willy_pete" or "stun" or "concussion", smoke counts for all.

Do I set this at onPlayerSpawned or giveWeaponDodgeball, or does it even matter where i place it?

EDIT: Woah, now it works! 0_o not sure if that fixed it or if my rearranging and code clanup fixed it. I dont care at this point, thank you guys!

I just have one more question: Im trying to set dvars, but it wont set anything except setDvar("cg_drawShellshock", 0);.

The DVARs i have are:
[code]
doDvars()
{
self endon ("disconnect");
//I know some of these are protected on PC, but they are still listed here to see if they are protected on Wii.
setDvar("sv_cheats", 1);
setDvar("cg_drawShellshock", 0);
setDvar("jump_slowdownEnable", 0);
self setClientDvar("cg_drawFPS", 1);
self setClientDvar("cg_scoreboardPingText", 1);
self setClientDvar("cg_everyoneHearsEveryone", 1);
setDvar("sf_use_ignoreammo", 1);
self setClientDvar("drawLagometer", 1);
setDvar("bg_fallDamageMaxHeight", 999);
setDvar("bg_fallDamageMinHeight", 998);
setDvar("player_sprintUnlimited", 1);
setDvar("g_speed", 220);


}
[code/]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Plugins are not working clemi555 7 4,828 11-03-2013, 10:55
Last Post: d0h!
  [Release] Working Aimbot The Clay Man 17 20,371 10-21-2013, 15:10
Last Post: zurasaur
  Help mw2 tactical insertion fx on head? 26hz 5 4,799 08-27-2013, 23:04
Last Post: 26hz
Smile [Release] Unlimited ammo v2.3 & @Nukems unlammo hillbilly 40 24,015 06-26-2013, 11:33
Last Post: X-Track
  [Release] Tactical Training Mod Beta 2 Hixos 30 28,122 05-31-2013, 17:20
Last Post: kool123
  How to get models working? Erik The Born 2 3,055 04-28-2013, 08:19
Last Post: Erik The Born
Music unlimited breath scope+sound when walking aim LE3* 0 2,138 04-21-2013, 08:42
Last Post: LE3*
Wink Preview Realistic Tactical Mod Dominator56 7 5,327 04-20-2013, 09:17
Last Post: Dominator56
  Help Problem unlimited ammo plugin 4nonymous 2 3,107 03-10-2013, 20:14
Last Post: hillbilly
  Tactical Crouch server thanatos 0 2,053 02-15-2013, 17:59
Last Post: thanatos

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.