Raised This Month: $12 Target: $400
 3% 

[L4D & L4D2] Multiple Equipments


Post New Thread Reply   
 
Thread Tools Display Modes
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-14-2013 , 11:59   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #111

Quote:
Originally Posted by MasterMind420 View Post
Ok so what im trying to do with this plugin is....I've swapped the pistols into slot0 because i want limited pistol ammo, this was the easiest way to get them to reload and the bots will reload them too. I created a plugin to reload pistols but its not ideal because bots don't take advantage of this. to make it work, i made melee weapons usable while incap because lets face it, when bots run out of ammo in the pistol we dont need them helpless, especially while incap....so the way i have it now, bots pickup melee weapons then pistols, carry both and when out of ammo switch to melee...works rather well...problem i have now is only being able to carry pistols or a rifle or whatever...tried to fix it by switching the slots for primary weapons, switching it to say slot6 would allow carrying pistols melee and a primary gun. problem is when doing this it breaks all primary gun spawns on maps and u can't reload them at ammo piles(not a big deal i can fix that with a plugin), tried to fix the spawn issue with stripper without any luck...so now im using this mod to correct the issue, however now the pistols just disappear completely and i keep losing access to the primary gun in general. so switching between the 2 items in the slot causes problems. Obviously this isn't a clean server, and im sure some of my mods are the issue here, but i would like to get this working. Having a pistol, melee and primary gun just makes more sense, and having the bots take advantage of this is even better. I'm so close to getting this to work but i need to figure out how to get pistols in primary and working with this plugin...any ideas or suggestions are welcome... so i need to account for the pistol slot being switched to primary in this plugin...
What are you talking about?
Why dont just use Cookies to store player weapon data. Update the cookies every time player pick up something or shit something. In case player go idle and re-enter, load the last known item.

EDIT: Why bother create ton of extra plugins to fix 1 plugin. It not best solution.


Quote:
Originally Posted by ZBzibing View Post
小海,你得插件非常棒,想法也非常新颖,谢谢你的贡献
WTF..

EDIT: So.. panxiohai chines name when translated to english is "Small Ocean". Nice name pan.. love it..
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-14-2013 at 12:08.
GsiX is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 12-14-2013 , 12:14   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #112

haha im not saying create a ton of plugins to fix this one, I could honestly care less about the spectate glitch. My issue is having pistols in primary and setting this to enable primary or secondary switching makes the pistols vanish, albeit its not the normal slot for pistols, but im sure this could be edited to fix this which i will do. The only plugin I mentioned was a pistol reloading plugin i created to resolve pistol reloading issues. Switching the pistol slot to 0 is a better solution than using a plugin because bots take advantage of this...i will look into your suggestion on cookies

Last edited by MasterMind420; 12-14-2013 at 12:16.
MasterMind420 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-14-2013 , 12:20   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #113

As i recall palyer weapon data including slot number was stored in client.dll. Not sure if it possible to alter the slot position without issue.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-14-2013 at 12:22. Reason: My english shorter than expected..
GsiX is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 12-14-2013 , 12:29   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #114

i've successfully switched pistols to slot0 and kept melee in slot1, pistol now reloads because of being in slot0. I used an addon i created to do this, not a plugin. works online with a dedicated server, pistols still appear in secondary slot but are actually in the primary. Ok i can see this problem will probably be alot harder than its worth. So possibly another solution would be to switch all primary guns to slot 6, allowing carrying a pistol, melee and primary gun all at once. Problem is when switching primary guns out of slot0 breaks weapon spawning and the ability to reload(not a problem with another plugin i made), tried to correct weapon spawns with stripper source but failed, not sure i was going about it correctly. Tried replacing weapon spawns with random weapon spawns didn't work. I may have to manually place weapons on all maps. Which i'd like to avoid. maybe ill try using weapon spawner and see what happens.

Last edited by MasterMind420; 12-14-2013 at 12:32.
MasterMind420 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-14-2013 , 12:48   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #115

I doubt you can.. you just tweak the weapon data cause the director fail to spawn it. Try the command "give rifle" with sv_cheats 1 and see if the director still acting..
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 12-14-2013 , 12:55   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #116

yah that was the first thing i tried, before i decided to use stripper source. You can spawn any of the guns using the cheat give command. which led me to believe using stripper would work. The weapon spawns are the only thing that seems to be broke...im positive using stripper will fix this but i dont want to have to do it manually for every spawn. There has to be an easier way.

Last edited by MasterMind420; 12-14-2013 at 12:56.
MasterMind420 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-14-2013 , 13:30   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #117

Now try again with CreateEntityByName() to create a rifle. Here is the main part if the director is acting or not or you just broke something in your addons.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 12-14-2013 , 13:54   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #118

ok so not to sound like a noob, where exactly am i putting it, within a plugin, stripper source global config, or console? i assume plugin because its code...
and this will spawn the rifle CreateEntityByName(), not this CreateEntityByName(rifle)???

Last edited by MasterMind420; 12-14-2013 at 13:57.
MasterMind420 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-14-2013 , 14:01   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #119

Make sure your custom addons are running.

PHP Code:
decl Float:myPos[3];
    
GetEntPropVectorclientProp_Data"m_vecOrigin"myPos );
    
myPos[2] += 10.0;
    
    new 
rifle CreateEntityByName"weapon_rifle" );
    if( 
rifle != -)
    {
        
DispatchKeyValueVectorrifle"origin"myPos );
        
DispatchSpawnrifle );
    }
    else
    {
        
PrintToChatAll"Fail to create a weapon" );
    } 
EDIT: Why do we hijack pan's thread for no reason?
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-14-2013 at 14:07.
GsiX is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 12-14-2013 , 14:02   Re: [L4D & L4D2] Multiple Equipments
Reply With Quote #120

ok got ya, thankyou for the help...
MasterMind420 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode