AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Extra Item: Golden Ak - 47 v1.1 Fix (https://forums.alliedmods.net/showthread.php?t=91718)

AlejandroSk 05-04-2009 14:50

[ZP] Extra Item: Golden Ak - 47 v1.1 Fix
 
2 Attachment(s)
[ZP] Extra Item: Golden AK 47

By AlejandroSk

Description:

Adds a new weapon to Zombie Plague Mod , Golden Ak - 47 , That have new features.
Cost: 30 Ammo Packs


Features:

- When you use this weapon you have unlimited ammo
- This weapons has more damage [ Default x5 ]
- This weapon has AUG zoom [attack2]
- Show the way of the bullets


Cvars:

- zp_goldenak_dmg_multiplier <5> - Damage Multiplier for Golden Ak 47
- zp_goldenak_gold_bullets <1|0> - Golden bullets effect ?
- zp_goldenak_cost <30> - Golden Ak Cost
- zp_goldenak_custom_model <1|0> - Golden ak Custom Model
- zp_goldenak_unlimited_clip <1|0> - Unlimited Clip?


Changelog

Code:

v0.01 - 04 May 2009 - First Release
v0.02 - 04 May 2009 - Fixed some errors in the code [ Thanks IneedHelp ]
v0.03 - 04 May 2009 - Fixed again, Thanks to all.
v0.04 - 04 May 2009 - Changed a bit of code , Thanks Starsailor & arkshine
v0.04Fix - 04 May 2009 - Fixed
v1.0 - 06 May 2009 - Fixed And Tested
v1.1 - 07 May 2009 - Fixed zoom of Aug  - Sg

ScreenShot

http://i44.tinypic.com/245ykgp.jpg

Credits

- fezh
- KaoS
- IneedHelp
-Vittu


This is my first plugin =)
SUGGESTION ARE WELCOME!

KadiR 05-04-2009 15:00

Re: [ZP] Extra Item: Golden Ak - 47
 
very nice plugin :)

+k

AlejandroSk 05-04-2009 15:27

Re: [ZP] Extra Item: Golden Ak - 47
 
Quote:

Originally Posted by KadiR (Post 821053)
very nice plugin :)

+k

Thank you :mrgreen:

IneedHelp 05-04-2009 17:09

Re: [ZP] Extra Item: Golden Ak - 47
 
PHP Code:

#define iRegister register_plugin("[ZP] Extra: Golden Ak 47", "0.01", "AlejandroSk") 

that's weird

PHP Code:

    // Reset Hud
    
register_event("ResetHUD","newRound","b"

:nono:. You are including ham, you can use Ham_Spawn

PHP Code:

public checkWeapon(idmsg_entity

msg_entity?

PHP Code:

new dmg get_pcvar_num(cvar_dmgmultiplier

use get_pcvar_float (damage is a float)

PHP Code:

"weapons/electro5.wav" 

you should precache that sound because emit_sound() - Sample must be precached

Quote:

Originally Posted by IneedHelp (Post 816414)
fun @ give_item > fakemeta_util @ fm_give_item

You should use give_item from fun module instead...read this

AlejandroSk 05-04-2009 17:17

Re: [ZP] Extra Item: Golden Ak - 47
 
Quote:

You should use give_item from fun module instead...read this
So i add fun module?

alan_el_more 05-04-2009 17:41

Re: [ZP] Extra Item: Golden Ak - 47
 
Quote:

Originally Posted by AlejandroSk (Post 821124)
So i add fun module?

yes
btw, the plugin sound cool, +k :D

AlejandroSk 05-04-2009 17:48

Re: [ZP] Extra Item: Golden Ak - 47
 
i get tag mismatch on this line:

Code:
    new szClip, szAmmo
someone know why?

@ineedhelp
Updating now , thank you

fezh 05-04-2009 17:52

Re: [ZP] Extra Item: Golden Ak - 47
 
@ AlejandroSk: Nothing bad with that line, you should re-view your code.

PS:
PHP Code:

    if (!equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
        return 


Some code is useless there, adapt the function to your need.

AlejandroSk 05-04-2009 17:56

Re: [ZP] Extra Item: Golden Ak - 47
 
Quote:

Originally Posted by fezh (Post 821143)
@ AlejandroSk: Nothing bad with that line, you should re-view your code.

PS:
PHP Code:

    if (!equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
        return 


Some code is useless there, adapt the function to your need.

Fixed the tag mismatch ;)

I already deleted stock fm_give_item from my plugin , thank you

alan_el_more 05-04-2009 18:11

Re: [ZP] Extra Item: Golden Ak - 47 v0.02
 
PHP Code:

if (get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker])
{
        
SetHamParamFloat(4damage dmg)


:arrow:
PHP Code:

if (get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker])
{
        
SetHamParamFloat(4damage *= dmg)




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

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