AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Extra Item: Grenade Launcher (https://forums.alliedmods.net/showthread.php?t=100430)

NiHiLaNTh 08-14-2009 14:01

[ZP] Extra Item: Grenade Launcher
 
2 Attachment(s)
--- 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---
http://s001.radikal.ru/i193/1002/a7/fd8917cc2751t.jpg

---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 :wink:

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

--- Have Fun ---

sunx 08-14-2009 14:30

Re: [ZP] Extra Item: Grenade Launcher
 
Wohoooo, i hope its another nice plugin from you :D

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 ;) :D

NiHiLaNTh 08-14-2009 14:36

Re: [ZP] Extra Item: Grenade Launcher
 
Quote:

Originally Posted by sunx (Post 899908)
Wohoooo, i hope its another nice plugin from you :D

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

+ karma for the work :)

Thank you

meTaLiCroSS 08-14-2009 16:22

Re: [ZP] Extra Item: Grenade Launcher
 
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

5c0r-|3i0 08-15-2009 01:36

Re: [ZP] Extra Item: Grenade Launcher
 
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 ^^!..

NiHiLaNTh 08-15-2009 02:40

Re: [ZP] Extra Item: Grenade Launcher
 
meTaLiCroSS ok

Quote:

Originally Posted by 5c0r-|3i0 (Post 900707)
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

joaquimandrade 08-15-2009 02:56

Re: [ZP] Extra Item: Grenade Launcher
 
Quote:

Originally Posted by 5c0r-|3i0 (Post 900707)
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 


Zombiezzz 12-24-2009 13:38

Re: [ZP] Extra Item: Grenade Launcher
 
nice!

NiHiLaNTh 12-26-2009 04:54

Re: [ZP] Extra Item: Grenade Launcher
 
As soon as possible I will update this plugin, and fix some bugs.

Shalun 12-30-2009 14:43

Re: [ZP] Extra Item: Grenade Launcher
 
Has found a bug. Buying the second Grenade Launcher, the player receives 5 ammo O_o


All times are GMT -4. The time now is 15:28.

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