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

Subplugin Submission [ZP] Extra Item: Grenade Launcher


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-14-2009 , 14:01   [ZP] Extra Item: Grenade Launcher
Reply With Quote #1

--- Intro ---
This plugin add new weapon to zombie plague - m79 grenade launcher, like in CSO(I think so).This is powerful weapon which shoot with grenades.It has 1 grenade in a clip and 10 in back pack.Also you can buy grenades for M79(as additional extra item).You can customize clip, back pack ammo amount, reload time trail colors.

--- Credits ---
NiHiLaNTh - Plugin
Shalun - M79 model
meTaLiCroSS - FM_SetModel, EV_INT_WEAPONKEY
Arkshine - Play weapon animation stock/grenade angles

--- Changelog---
Code:
v1.0 - First release
v1.1 - Completely rewrited plugin
v1.2 - Fixed bug with unlimited ammo(Clip ammo updating correctly)
     - Removed a lot of unnecessary code
     - Fixed bug with reloading
--- CVARs---
zp_m79_maxdmg 450 -- Maximal damage
zp_m79_radius 500 -- Damage radius
zp_m79_oneround 1 -- If 1 weapon will stay only 1 round
zp_m79_knockback 10 -- Knockback power

--- Screenshots---


---Additional notes---
NOTE1. Put this plugin name, BEFORE main plugin(zombie_plague40.amxx) in plugins-zplague.ini.(Or weapon will work shitty).
NOTE2. If you are using original weapon models (which are provdied in this plugin) DON'T CHANGE SOUND PATHS, or you'll not hear reload sound.

NOTE3. Re-download resources.zip, please

If you find any bug - report it here(DONT PM ME)!

--- Have Fun ---
Attached Files
File Type: zip resources.zip (603.5 KB, 8805 views)
File Type: sma Get Plugin or Get Source (zp_extra_m79.sma - 10628 views - 26.9 KB)
__________________


Last edited by NiHiLaNTh; 04-18-2010 at 06:19. Reason: Update to v1.2
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
sunx
Veteran Member
Join Date: Mar 2009
Location: Germany
Old 08-14-2009 , 14:30   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #2

Wohoooo, i hope its another nice plugin from you

I`ll test it on my server now & check the code

+ karma for the work

*EDIT:

- your bug - when people drop it, it looks like a normal shutgun ?

- n1 sky ;)
__________________


Last edited by sunx; 08-14-2009 at 14:39.
sunx is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-14-2009 , 14:36   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #3

Quote:
Originally Posted by sunx View Post
Wohoooo, i hope its another nice plugin from you

I`ll test it on my server now & check the code

+ karma for the work
Thank you
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-14-2009 , 16:22   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #4

PHP Code:
//Simple shotgun
        
else
        {
            
// View model
            
entity_set_string(idEV_SZ_viewmodel"models/v_xm1014.mdl")
            
            
// Player model
            
entity_set_string(idEV_SZ_weaponmodel"models/p_xm1014.mdl")
        } 
Remove that.

My Weapon Touch code, is really bad here, check my newest version of my Sawn-Off

PHP Code:
 new grenade_count 
--->
PHP Code:
new grenade_count[33
Also, http://forums.alliedmods.net/showthread.php?t=99339
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross

Last edited by meTaLiCroSS; 08-14-2009 at 16:30.
meTaLiCroSS is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 08-15-2009 , 01:36   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #5

PHP Code:
// New round started
public Event_NewRound(id)
{
    if (
g_restarted)
    {
        
// Strip from M79 if game have been restarted
        
for (new 0get_maxplayers(); i++)
        {
            
g_hasM79[i] = false
        
}
        
g_restarted false
    
}

Will this work ?? I tried several times in my plugins and seems it doesn't work at all ...I really don't know the reason ..Tell me how .
NJ anyway ^^!..
5c0r-|3i0 is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-15-2009 , 02:40   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #6

meTaLiCroSS ok

Quote:
Originally Posted by 5c0r-|3i0 View Post
PHP Code:
// New round started
public Event_NewRound(id)
{
    if (
g_restarted)
    {
        
// Strip from M79 if game have been restarted
        
for (new 0get_maxplayers(); i++)
        {
            
g_hasM79[i] = false
        
}
        
g_restarted false
    
}

Will this work ?? I tried several times in my plugins and seems it doesn't work at all ...I really don't know the reason ..Tell me how .
NJ anyway ^^!..
It should work, because I took it from another plugin and it werk
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 08-15-2009 , 02:56   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #7

Quote:
Originally Posted by 5c0r-|3i0 View Post
PHP Code:
// New round started
public Event_NewRound(id)
{
    if (
g_restarted)
    {
        
// Strip from M79 if game have been restarted
        
for (new 0get_maxplayers(); i++)
        {
            
g_hasM79[i] = false
        
}
        
g_restarted false
    
}

Will this work ?? I tried several times in my plugins and seems it doesn't work at all ...I really don't know the reason ..Tell me how .
NJ anyway ^^!..
It must be "i <=" instead of "i <", get_maxplayers should be cached and it should be "i = 1" instead of "i = 0"

Basically, that code as it is, works for every player except the one with the last id.

If you prefer you can make it another way. Not significantly better or worst. Different.

Instead of:

PHP Code:
 for (new 0get_maxplayers(); i++)
 {
      
g_hasM79[i] = false
 

PHP Code:
new clean[33]
g_hasM79 clean 
__________________
joaquimandrade is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-24-2009 , 13:38   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #8

nice!
__________________
Zombiezzz is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 12-26-2009 , 04:54   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #9

As soon as possible I will update this plugin, and fix some bugs.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Shalun
Member
Join Date: May 2009
Location: Russia
Old 12-30-2009 , 14:43   Re: [ZP] Extra Item: Grenade Launcher
Reply With Quote #10

Has found a bug. Buying the second Grenade Launcher, the player receives 5 ammo O_o
__________________
Shalun 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 05:20.


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