Author Topic: Disable USE button?  (Read 1779 times)

Offline Hajas

  • Rank: Private
  • *
  • Posts: 4
    • http://www.mods.hajas.org
Disable USE button?
« on: April 26, 2008, 01:26:17 pm »
Hello,

I'm already getting mad trying to look where is the code to this feature...

I want to disable the use button at certain point in middle of the match, but I simply can't find where this is triggered... :(

I already searched for usebuttonpressed and all that I found was simply ignored...

in _gameobjects I can disable the use in the bombs, ok, but I can't disable the pickup weapons in the ground, I already commented every single function at _weapons and I still can get weapons on the floor.

I can avoid the weapons be dropped, but isn't what I want to do...

there's nothing also in _globallogic what I see, so I think there's something above all that which is controlling the use key... any ideas?

thanks a lot!

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Disable USE button?
« Reply #1 on: April 27, 2008, 09:37:35 am »
You have me curious....WHY do you want to disable the USE button?

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Disable USE button?
« Reply #2 on: April 27, 2008, 01:29:22 pm »
Disabling the USE button will stop alot of other features.

Might be better to look at scripts on weapon Pick-Up ;)

Offline Hajas

  • Rank: Private
  • *
  • Posts: 4
    • http://www.mods.hajas.org
Disable USE button?
« Reply #3 on: April 27, 2008, 02:22:46 pm »
was the first thing that I did... went at weapons file...

Code: [Select]

onPlayerSpawned()
{
self endon("disconnect");

for(;;)
{
self waittill("spawned_player");

self.concussionEndTime = 0;
self.hasDoneCombat = false;
self thread watchWeaponUsage();
self thread watchGrenadeUsage();
self thread watchWeaponChange();

self.droppedDeathWeapon = undefined;
self.tookWeaponFrom = [];

self thread updateStowedWeapon();
}
}


I already commented ALL of them, and STILL can pickup weapons on the floor...

there's also a function called watchPickup() which I also removed, and STILL can pickup the weapons... :(

but why I need this? I'll explain...

I did a feature that is working GREAT right now, is called Hajas Duel, so when left just one player to each side, all the weapons are removed, then they will need to bash each other to decide the round...

no problem about that, but I removed their weapons, then still have weapons on the floor, so it's just you get them to destroy the duel... that's why I want to avoid that...  :wink:

If I'll not make this, I'll need to make a function to remove all weapons from the floor... this is another solution...

I just need to know where exactly the use key are controlled, If you can just point me that, I'll do the rest... I simply can't find... I'm starting to think that is in the part of the code not available to us...  :roll:

thanks!