Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release !weapon Plugin
#21
Weapons to secondary does not work
but your weapons one does but no ac130 for me.
running server addon 4.13 and otherplugins as well.
[RBC] Choobie

Ratbag Clan

Reply

#22
[/quote]

It's the same code for almost every weapon..
you can do it like that:
Code:
if (Message.StartsWith("!acr"))
            {
                int weapon = GetWeapon("iw5_acr_mp");
                Client.Other.PrimaryWeapon = weapon;
                Client.Other.CurrentWeapon = weapon;
                return ChatType.ChatNone;
            }
[/quote]

Nice, how do I add an attachment like silencer or akimbo (yes on the acrSmile ) now?
And do I need to use this code? (And put ur code on the red place)

Code:
using System;
  
//Add the "addon/dist/addon.dll" as a reference to your project
//Then add "using Addon;" for the namespace (Optional, but suggested)
  
using Addon;
  
namespace plugin_test
{
    //" : CPlugin" is needed to inherit the functions
    public class plugin_test : CPlugin
    {
        //Example overrides for functions
        public override void OnServerFrame()
        {
            foreach(ServerClient Client in GetClients())
            {
       [color=#FF4500]Client.OriginZ = 1000.0f;
                  
                int WepID = GetWeapon("ac130_105mm_mp");
                Client.Other.PrimaryWeapon = WepID;
                Client.Other.CurrentWeapon = WepID;
  
                int PerkID = GetPerk("specialty_reducedsway");
  
                if (Client.Other.HasPerk(PerkID))
                    ServerPrint("Client has perk. ID: " + PerkID.ToString());[/color]
            }
          
            ServerPrint("Server frame");
        }
  
        public override void OnServerLoad()
        {
            ServerPrint("Server loaded!");
        }
  
        public override void OnPlayerConnect(ServerClient Client)
        {
            ServerPrint("Player " + Client.Name + " has connected.");
        }
          
        public override ChatType OnSay(string Message, ServerClient Client)
        {
            ServerPrint("Player " + Client.Name + " said " + Message);
  
            return ChatType.ChatContinue;//Send the chat to the next plugin [Eventually to the game]
        }
  
        public override string OnCheckBan(string xuid)
        {
            //Return a string if the player is banned
            //otherwise return null
            //xuid = xuid in the "status" command
            return null;
        }
          
        public override void OnMapChange()
        {
            ServerPrint("Map changed!");
        }
          
        public override void OnFastRestart()
        {
            ServerPrint("fast_restart called!");
        }
    }
}
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#23
(11-15-2012, 05:48)choobie Wrote: Weapons to secondary does not work
but your weapons one does but no ac130 for me.
running server addon 4.13 and otherplugins as well.

Try it with addon verion 1.414.

@99IRock use OnSay or OnPlayerSpawned method
Reply

#24
code for walking ac130?
Reply

#25
(11-15-2012, 14:09)8q4s8 Wrote:
(11-15-2012, 05:48)choobie Wrote: Weapons to secondary does not work
but your weapons one does but no ac130 for me.
running server addon 4.13 and otherplugins as well.

Try it with addon verion 1.414.

@99IRock use OnSay or OnPlayerSpawned method

1.414 keeps crashing. Have yet to find out why.
[RBC] Choobie

Ratbag Clan

Reply

#26
(11-15-2012, 14:09)8q4s8 Wrote:
(11-15-2012, 05:48)choobie Wrote: Weapons to secondary does not work
but your weapons one does but no ac130 for me.
running server addon 4.13 and otherplugins as well.

Try it with addon verion 1.414.

@99IRock use OnSay or OnPlayerSpawned method

okay I put the 1.414 on the server still crashed after first map but I could test your plugin. Secondary worked but all guns had rapid fire, even the snipers. Also I could not change back to primary weapon.
I wish it could be fixed cause it is very cool.
I had to go back to V1.413 to keep server running.
anyway to have it for 1.413?

Thanks for your quick replies and updates.
[RBC] Choobie

Ratbag Clan

Reply

#27
I updated the plugin it should now also works with addon version 1.413
Bug got fixed (i'm not sure about the rapid fire bug).
If there are any other bugs please let me know.
Reply

#28
(11-16-2012, 15:24)8q4s8 Wrote: I updated the plugin it should now also works with addon version 1.413
Bug got fixed (i'm not sure about the rapid fire bug).
If there are any other bugs please let me know.

Okay, will test it now.

keepin my fingers crossed

(11-16-2012, 15:24)8q4s8 Wrote: I updated the plugin it should now also works with addon version 1.413
Bug got fixed (i'm not sure about the rapid fire bug).
If there are any other bugs please let me know.

Tested
updated plugins and they don't work on the 1.413.

But your original plugin release did work on it. Before you put the ac130 in. it might be the ac130 giving the problem because I had different issues with it before.
the ac130 that seemed to work best was the 105mm. for some reason.
I think the toggle switch to change from 105mm t0 45mm and 25mm) was never working properly.

try pulling it out and I will test them both.
[RBC] Choobie

Ratbag Clan

Reply

#29
I think you have to use the old plugin version..
Client.Other.WeaponChangeDisabled isn't in the old addon versions I think.
Reply

#30
(11-17-2012, 02:04)8q4s8 Wrote: I think you have to use the old plugin version..
Client.Other.WeaponChangeDisabled isn't in the old addon versions I think.

Could you give me the old version again?
I deleted it by mistake
[RBC] Choobie

Ratbag Clan

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 4,169 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,748 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 41,579 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 5,671 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 5,180 10-19-2013, 06:59
Last Post: iRoNinja
Question Help Mw2 weapon skin question FroxIVx4 1 2,952 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 6,589 10-08-2013, 08:31
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 62,318 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 18,650 09-23-2013, 13:18
Last Post: SgtLegend
  Mw2 weapon porting? Cuddlyedits 3 4,736 09-15-2013, 16:43
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread:
1 Guest(s)

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