• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get secondary
#1
Does anyone know how to get a player's secondary weapon?
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
  Reply
#2
Self giveweapon("makarov_mp");
No?)
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
  Reply
#3
(06-13-2011, 22:16)G-Man Wrote: Self giveweapon("makarov_mp");
No?)

.. -.-
I said it with correct grammars and spelling. I think the last 5 posts I've made were, but you force me to dumb them down.
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
  Reply
#4
Sorry for useless spam azu
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
  Reply
#5
I couldn't find an easy way of doing it, but you could try this.

PHP Code:
HowToGetSecondary()
{
     return 
self.secondaryweapon;
}

HowToUseSecondary()
{
   if(
HowToGetSecondary() == "")
self giveweapon (whatever)


I havn't checked any of that but I tryed Tongue
  Reply
#6
Code:
func()
{
secondary = undefined;
wep = self GetWeaponsList();
for(i=0;i<wep.size;i++)
{
    if(isSecondaryWeapon(wep[i]))
    {
        secondary = wep[i];
        break;
    }
}
}

isSecondaryWeapon(weaponName)
{
    switch(maps\mp\gametypes\_missions::getWeaponClass(weaponName))
    {
        case "weapon_pistol":
        case "weapon_launcher":
        case "weapon_special":
            return true;
    }
    return false;
}
helped ya? rep me +
  Reply
#7
(06-14-2011, 05:34)met94 Wrote:
Code:
func()
{
secondary = undefined;
wep = self GetWeaponsList();
for(i=0;i<wep.size;i++)
{
    if(isSecondaryWeapon(wep[i]))
    {
        secondary = wep[i];
        break;
    }
}
}

isSecondaryWeapon(weaponName)
{
    switch(maps\mp\gametypes\_missions::getWeaponClass(weaponName))
    {
        case "weapon_pistol":
        case "weapon_launcher":
        case "weapon_special":
            return true;
    }
    return false;
}

Thank you Heart
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Receiving a random primary & secondary DidUknowiPwn 5 4,067 07-22-2013, 09:47
Last Post: Yamato
Rainbow [Release] No ammo for secondary Nekochan 11 6,122 09-09-2012, 15:05
Last Post: ALEXFDR
  [Request] plugin to remove all secondary ammo ALEXFDR 1 2,126 09-08-2012, 23:32
Last Post: Nekochan
  [Release] Camo on secondary weapon banz 2 2,635 08-11-2012, 11:55
Last Post: Yamato
  secondary weapon without bullets? kpoviv 0 1,653 07-22-2012, 21:51
Last Post: kpoviv
  [Release] iPaddie Pack-a-Punch Zombie Secondary weapon Pack iPaddie 15 12,754 02-16-2011, 03:00
Last Post: Cgallagher

Forum Jump:


Users browsing this thread: 1 Guest(s)