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

[L4D] Spawn Minigun


Post New Thread Reply   
 
Thread Tools Display Modes
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 12-31-2009 , 18:07   Re: [L4D] Spawn Minigun
Reply With Quote #41

Works perfact for me
gamemann is offline
Send a message via Skype™ to gamemann
a Muffin
Junior Member
Join Date: Apr 2010
Location: in asia
Old 04-04-2010 , 13:08   Re: [L4D] Spawn Minigun
Reply With Quote #42

works for l4d2
a Muffin is offline
J.P.
New Member
Join Date: Aug 2010
Old 08-29-2010 , 14:29   Re: [L4D] Spawn Minigun
Reply With Quote #43

Quote:
Originally Posted by antihacker View Post
Do this, if you have Problems i will try to answere
You can change the radius of the weapon and some thing i will try out what its possible tomorrow.
Where is the plugin folder?
J.P. is offline
J.P.
New Member
Join Date: Aug 2010
Old 08-29-2010 , 20:42   Re: [L4D] Spawn Minigun
Reply With Quote #44

Dude it doesnt work 4 me
J.P. is offline
blablubde
Member
Join Date: Sep 2010
Old 10-15-2010 , 11:04   Re: [L4D] Spawn Minigun
Reply With Quote #45

the plugin works great, but can u add both miniguns?
the gatling from l4d1 and the 50.cal from l4d2

maybe with different cmds?
eg:
sm_minigunspawn_l4d1 for the l4d1 gun
and
sm_minigunspawn_l4d2 for the l4d2 gun?

Last edited by blablubde; 11-11-2010 at 14:00. Reason: replaced my command ideas with the correct ones.
blablubde is offline
blablubde
Member
Join Date: Sep 2010
Old 11-11-2010 , 13:59   Re: [L4D] Spawn Minigun
Reply With Quote #46

no one replied to my request, so i had to try it on my own.
first of all: i never wrote a plugin and i did not read much about coding a plugin. this is my first try and i got it working. (i took the code of antihacker and modified it)


With the original plugin u could spawn only 1 version of the minigun. Depending by the game u got only the L4D1 or the L4D2 version.
Now, with my new version of this plugin, u can spawn both versions of the minigun in both games.
=> u can spawn the 50.cal in L4D1 and the normal gatling minigun.
=> u can spawn the gatling minigun in L4D2 and the normal 50.cal.

BUT: i had to make 2 different plugins (one for each game) because the code is not the same in both games. (and i dont know, how to make a plugin, which can see which game is running and select the fitting code):

To use it u need the CHEAT flag.

So there are now 2 versions of the plugin. One for each game:
  • L4D1
    spawnminigun_l4d1.smx / spawnminigun_l4d1.sp
  • L4D2
    spawnminigun_l4d2.smx / spawnminigun_l4d2.sp
Console Commands:
(they are the same for both plugins)
  • sm_minigunspawn_l4d1
    => create a L4D1 minigun. (gatling)
  • sm_minigunspawn_l4d2
    => create a L4D2 minigun. (50.cal)
  • sm_minigunrotate <Entity ID|-1|-2> <Degree>
    => Rotate a minigun by a defined Degree with its entity ID, or if -1 the minigun looking at, or if -2 the last minigun created. (no matter if it is L4D1 or L4D2 version)
  • sm_minigundelete <Entity ID|-1|-2>
    => Removes a mingun by its entity id, or if -1 the minigun looking at, or if -2 the last minigun created. (no matter if it is L4D1 or L4D2 version)
  • sm_spawnminigun_version
    => shows the current version of the plugin.

I set the version to 2.0, because it is a "big change".

(In the "Source - Old Version.zip" file u can find the the latest version 1.0 of antihacker, which only creates one version of the minigun and i also used this version to create my own.)

I hope u enjoy it and it is working for u, too.


Miscellaneous:
  • The commands for rotating and deleting of the minigun i've never used. The delete command is working, but the rotate command doesn't work correct. (or i am to stupid to get how it works). Well, it rotates the gun, but not in the angle i want.
    These 2 commands are inside the plugin, because i don't know if anyone used them or not. (They where in the original plugin, so i didn't delete them).
    On the servers i play, there is also the buildenabler, so i dont need these commands for deleting and rotating.
  • As i wrote above, i dont have much idea how to write a plugin, so i cant provide much support. Of course u can write bugs here, but im not sure if i can help.
  • I decided to add the modified version of this plugin in this thread and not to create a new one, because it is nearly the same plugin.
  • In the plugin, there is a different name (not blablubde). In the plugin i've used my normal in-game name "Drakexz".
  • i apologize for my bad english.
Attached Files
File Type: sp Get Plugin or Get Source (spawnminigun_l4d1.sp - 435 views - 8.4 KB)
File Type: sp Get Plugin or Get Source (spawnminigun_l4d2.sp - 467 views - 8.3 KB)
File Type: zip Source - Old Version.zip (6.4 KB, 179 views)

Last edited by blablubde; 12-10-2010 at 04:18. Reason: added admin flag.
blablubde is offline
KarnageInk
Member
Join Date: Oct 2010
Old 11-14-2010 , 11:54   Re: [L4D] Spawn Minigun
Reply With Quote #47

wow wow wow! nice 1.
KarnageInk is offline
Multi_Read
New Member
Join Date: Nov 2010
Old 11-23-2010 , 02:44   Re: [L4D] Spawn Minigun
Reply With Quote #48

Hello, this is my first post on Allied Mods.

I wanted to show you guys a much MUCH easier way to rotate the objects. I should mention this is for L4D2, I'm uncertain if this works in L4D1.

I created a config (cfg) with these binds, named it proprotate and put it in the ordinary cfg folder.

bind "del" "ent_remove"
bind "leftarrow" "ent_rotate 90"
bind "rightarrow" "ent_rotate 45"
bind "uparrow" "ent_rotate 180"
bind "downarrow" "ent_rotate 270"

In game, I bring down the console and type exec proprotate (or just start typing pro and then hit the down arrow to auto fill).

After you have executed this config, you can spawn your minigun of choice and then just point your laser or crosshair at the minigun (making sure the very center of either one is on a part of the minigun) and press one of the arrows to turn it whatever you want. You can set this to any number between 1 and 360 but obviously only a few are needed or make sense.

To delete a minigun, just do the same thing... point your crosshair or laser at the minigun and press Del (delete key).

Very nice script AntiHacker, I enjoy using it very much

And good job blablubde as well!

Last edited by Multi_Read; 11-23-2010 at 03:31.
Multi_Read is offline
blablubde
Member
Join Date: Sep 2010
Old 11-23-2010 , 15:28   Re: [L4D] Spawn Minigun
Reply With Quote #49

sorry Multi_Read, but this doesnt work.

yes, it will rotate the minigun, but if u try to use it, u will see the problem. it does only rotate the visible part of the gun. the invisible part (dono how to describe it) wont be rotated. => u cant use the gun as intended.


just try it. u will see what i mean.

and another thing: u cant use the ent_rotate command in every server (afaik). u have to enable it fist. (e.g. with the buildenabler)

Last edited by blablubde; 11-23-2010 at 15:30.
blablubde is offline
Multi_Read
New Member
Join Date: Nov 2010
Old 11-23-2010 , 15:50   Re: [L4D] Spawn Minigun
Reply With Quote #50

Okay, I looked into this some more....

Unfortunately you're correct, although the gun does rotate it still only shoots the radius it spawned as.

But ent_rotate works on any server with cheats enabled and sourcemod installed. I'm not sure if sourcemod has to be, but its the only mod we have running so figured I'd add that.

Those binds are still very useful for other prop creations, hopefully someone that read this topic learned about those.

Sorry for the confusion, I thought it worked and excitedly posted... to soon.

Last edited by Multi_Read; 11-23-2010 at 20:52. Reason: I screw up.
Multi_Read is offline
Reply



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 17:59.


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