Tutorial MW3 weapons, perks, camos, attachments....
#41
(12-29-2012, 17:47)8q4s8 Wrote:
(12-29-2012, 17:07)99IRock Wrote:
(12-29-2012, 17:00)SaviouR9966 Wrote:
(12-26-2012, 22:46)SaviouR9966 Wrote:
(12-26-2012, 17:51)8q4s8 Wrote: Add this to the code

Client.Other.CurrentWeapon = weapon;


It does not work, weapon just does not appear

8Q4S8 code edited:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace ClassLibrary1 { public class Class1 : CPlugin { public override ChatType OnSay(String Message, ServerClient Client, bool Teamchat) // Onsay event { if (Message == "!acr") { if (Client.XUID == xuid1 || Client.XUID == xuid2) //replace xuid { int acr = GetWeapon("iw5_acr_mp"); //any weapon you want Client.Other.PrimaryWeapon = acr; Client.Other.CurrentWeapon = acr; Client.Ammo.PrimaryAmmoClip = 1034; // Gives 1034 ammo return ChatType.ChatNone;// The message won't appear in chat } } } public override void OnPlayerSpawned(ServerClient Client) { int weapon = GetWeapon("iw5_acr_mp"); //any weapon you want if (Client.XUID == xuid1 || Client.XUID == xuid2) //replace xuid { Client.Other.PrimaryWeapon = weapon; // The primary weapon will be weapon Client.Other.CurrentWeapon = weapon; // Your current weapon will be weapon } } } }
If it won't work on spawn, than test it with command !acr
If that one works and onspawn not than it's just something with onspawn

CurrentWeapon doesn't work OnPlayerSpawned I already tried it. Maybe you can remove primary and add it to a other weapon slot but i don't know if this will work

I also thought about it, but how?
Reply

#42
Maybe this will work:
Code:
Client.Other.PrimaryWeapon = 0; Client.Other.WeaponSlot3 = weapon;
Reply

#43
(12-30-2012, 02:42)8q4s8 Wrote: Maybe this will work:
Code:
Client.Other.PrimaryWeapon = 0; Client.Other.WeaponSlot3 = weapon;

does not work. Can supply timer on spawn weapons the for example 1-2 seconds after spawning player. Can you please write the code to the timer
Reply

#44
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace Premium { public class Class1 : CPlugin { public override void OnPlayerSpawned(ServerClient Client) { if (Client.Team == Teams.Allies) { if (Client.XUID == "you xuid") { iPrintLnBold("^5Premium weapons activated", Client); int weapon = GetWeapon("iw5_deserteagle_mp_tactical"); Client.Other.WeaponSlot3 = weapon; Client.Other.CurrentWeapon = Client.Other.WeaponSlot3; Client.Other.PrimaryWeapon = Client.Other.WeaponSlot3; Client.Ammo.PrimaryAmmoClip = +230; Client.Ammo.PrimaryAmmo = +8; } } } } }




it works
Reply

#45
(12-30-2012, 12:54)SaviouR9966 Wrote:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace Premium { public class Class1 : CPlugin { public override void OnPlayerSpawned(ServerClient Client) { if (Client.Team == Teams.Allies) { if (Client.XUID == "you xuid") { iPrintLnBold("^5Premium weapons activated", Client); int weapon = GetWeapon("iw5_deserteagle_mp_tactical"); Client.Other.WeaponSlot3 = weapon; Client.Other.CurrentWeapon = Client.Other.WeaponSlot3; Client.Other.PrimaryWeapon = Client.Other.WeaponSlot3; Client.Ammo.PrimaryAmmoClip = +230; Client.Ammo.PrimaryAmmo = +8; } } } } }




it works

But I am still interested in Timer. Can supply timer on spawn weapons the for example 1-2 seconds after spawning player. Can you please write the code to the timer
Reply

#46
(01-01-2013, 10:02)SaviouR9966 Wrote:
(12-30-2012, 12:54)SaviouR9966 Wrote:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace Premium { public class Class1 : CPlugin { public override void OnPlayerSpawned(ServerClient Client) { if (Client.Team == Teams.Allies) { if (Client.XUID == "you xuid") { iPrintLnBold("^5Premium weapons activated", Client); int weapon = GetWeapon("iw5_deserteagle_mp_tactical"); Client.Other.WeaponSlot3 = weapon; Client.Other.CurrentWeapon = Client.Other.WeaponSlot3; Client.Other.PrimaryWeapon = Client.Other.WeaponSlot3; Client.Ammo.PrimaryAmmoClip = +230; Client.Ammo.PrimaryAmmo = +8; } } } } }




it works

But I am still interested in Timer. Can supply timer on spawn weapons the for example 1-2 seconds after spawning player. Can you please write the code to the timer

Nero sorry me)) I meyan just a bad mood! I know how to solve all of our bugs on the server!
Reply

#47
(12-30-2012, 12:54)SaviouR9966 Wrote:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace Premium { public class Class1 : CPlugin { public override void OnPlayerSpawned(ServerClient Client) { if (Client.Team == Teams.Allies) { if (Client.XUID == "you xuid") { iPrintLnBold("^5Premium weapons activated", Client); int weapon = GetWeapon("iw5_deserteagle_mp_tactical"); Client.Other.WeaponSlot3 = weapon; Client.Other.CurrentWeapon = Client.Other.WeaponSlot3; Client.Other.PrimaryWeapon = Client.Other.WeaponSlot3; Client.Ammo.PrimaryAmmoClip = +230; Client.Ammo.PrimaryAmmo = +8; } } } } }




it works

It works! thank you so much!!! Nyan Cat
Reply

#48
(12-30-2012, 12:54)SaviouR9966 Wrote:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; namespace Premium { public class Class1 : CPlugin { public override void OnPlayerSpawned(ServerClient Client) { if (Client.Team == Teams.Allies) { if (Client.XUID == "you xuid") { iPrintLnBold("^5Premium weapons activated", Client); int weapon = GetWeapon("iw5_deserteagle_mp_tactical"); Client.Other.WeaponSlot3 = weapon; Client.Other.CurrentWeapon = Client.Other.WeaponSlot3; Client.Other.PrimaryWeapon = Client.Other.WeaponSlot3; Client.Ammo.PrimaryAmmoClip = +230; Client.Ammo.PrimaryAmmo = +8; } } } } }




it works

Is it possible for me to spawn with multiple weapons? Confused
Reply

#49
Does anyone know the code for Walking AC130?
Reply

#50
hi guys im new to the site im working on a new project called AddonPlus this is a Gui addon what works with appdomains and never cross threads with the main addon thread., but my main question is that the weapons are not working i have a thread where if CurrentWeapon != Weapon.Number then change weapon. i used weapon3 and everything but it just keep switching to the original weapon. Any clue?

Thanks,
eBotterz aka (NunYaBiz)
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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