ItsMods

Full Version: !Shop TK
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone shed any light why using !tk it wont actually give that weapon or indeed a betty?

PHP Code:
if (Message == "!tk")
                
                {
                    
int TKCost2 Convert.ToInt32(TKCost);


                    if ((int)
Points[Client.XUID] < TKCost2)
                    {
                        
iPrintLnBold("^1Not enough points!"Client);
                    }
                    else
                    {
                        
int WepID GetWeapon("throwingknife_mp");
                        
Client.Other.Equipment WepID;
                        
Client.Other.OffhandWeapon WepID;
                        
Client.Ammo.OffhandAmmo 2;
                        
Points[Client.XUID] = ((int)Points[Client.XUID]) - TKCost2;
                    } 
Code:
if (Message == "!emp")
                    {
                        int EmpGrenadeprice2 = Convert.ToInt32(empprice);


                        if ((int)Points[Client.XUID] < EmpGrenadeprice2)
                        {
                            iPrintLnBold("^1You don't have enough points!", Client);
                        }
                        else
                        {

                            int WepID = GetWeapon("emp_grenade_mp");
                            Client.Other.OffhandWeapon = WepID;
                            Client.Ammo.OffhandAmmo = 2;
                            Points[Client.XUID] = ((int)Points[Client.XUID]) - EmpGrenadeprice2;
                        }
                        return ChatType.ChatNone;

                    }

I guess the Client.Other.OffhandWeapon is wrong.
The emp grenade is OffhandWeapon, I guess there needs to be another one, because The empgrenade is not the same slot as the Throwingknife / grenade.
Maybe this information can help you :p. I will also search for it.
(I also saw this bug I just removed TK)

My inf ammo code gives inf grenades ( Semtex )
Code:
Client.Ammo.OffhandAmmo = 32767 * 32767;
                            Client.Ammo.PrimaryAmmoClip = 32767 * 32767;
                            Client.Ammo.PrimaryAmmo = 32767 * 32767;
                            Client.Ammo.SecondaryAmmoClip = 32767 * 32767;
                            Client.Ammo.SecondaryAmmo = 32767 * 32767;
                            Client.Ammo.WeaponSlot3AmmoClip = 32767 * 32767;
                            Client.Ammo.WeaponSlot3Ammo = 32767 * 32767;
                            Client.Ammo.WeaponSlot4AmmoClip = 32767 * 32767;
                            Client.Ammo.WeaponSlot4Ammo = 32767 * 32767;
                            Client.Ammo.WeaponSlot5AmmoClip = 32767 * 32767;
                            Client.Ammo.WeaponSlot5Ammo = 32767 * 32767;
                            Client.Ammo.WeaponSlot6AmmoClip = 32767 * 32767;
                            Client.Ammo.WeaponSlot6Ammo = 32767 * 32767;
                            Client.Ammo.PrimaryAkimboAmmo = 32767 * 32767;
                            Client.Ammo.SecondaryAkimboAmmo = 32767 * 32767;
                            Client.Ammo.WeaponSlot3AkimboAmmo = 32767 * 32767;
                            Client.Ammo.WeaponSlot4AkimboAmmo = 32767 * 32767;
                            Client.Ammo.WeaponSlot5AkimboAmmo = 32767 * 32767;
                            Client.Ammo.WeaponSlot6AkimboAmmo = 32767 * 32767;

So one of these lines needs to be the fix
just to update, the TK etc only works on addon version 1.414
Further update:

i have found that using this simple code will replenish c4, bettys and claymore, but not TK or Tactical.


int reward = GetWeapon("iw5_deserteagle_mp");
Client.Ammo.SecondaryAmmoClip = 100;
Client.Ammo.SecondaryAmmo = 20;
Client.Ammo.EquipmentAmmo = 1;
Client.Ammo.OffhandAmmo = 1;
Client.Other.SecondaryWeapon = reward;