AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Extra Item: CSO- SVDEX Update:1.14( no animation ) (https://forums.alliedmods.net/showthread.php?t=149025)

teobrvt1995 02-01-2011 02:54

[ZP] Extra Item: CSO- SVDEX Update:1.14( no animation )
 
2 Attachment(s)
*****descripton****
main plugin: mp5 grenade launcher ( 5cor plugin:D)

*****special thanks***
+5cor: for his mp5 plugin, tell me should use Ham to takedamage of m203 nade
+Nguyen Duy Linh( my friend, not in this 4rum) : fix error
+dias: for his Idea ( ak47 grenade)


*****history****:
*v1.0: first idea is ak47 grenade launcher, start convert mp5 -->ak
*v1.01:add multipler damage, but m203 nade damage doesnt work...
*v1.02:add zoom( use custom code), but it doesnt work in ZP 4.3 with Frostnade, when zombie is frozen, human until shoot them
*v1.03:remove old zoom code and add the new, ( it work :D)
*v1.04:try to find the model
*v1.05: use m203 touch in m79 weapon
*v1.06:add recoil, speed and add bpammo
*v1.07: optimizide code
*v1.08: change name ak47 grenade launcher ---> svdex:D
*v1.09:add more cvar for weapon
*v.1.1: add w model
*v1.11: add weapon sound ( SVDEX sound) thanks Nguyen Duy Linh, my friend,change set damage for m203 by FM to HAM, use ExecuteHamB
*v1.12: Fix ammo hud of grenade
*v1.13: remove some useful code
*v1.14: set clip and set weapon knockback:)

now, it done :D

*****cvar of weapon****
PHP Code:

  //register the cvar
  
cvar_knockback register_cvar("zp_svd_knock""2"// nade knockback
  
cvar_speed register_cvar("zp_svd_speed""3.0"//speed of weapon
  
cvar_recoil register_cvar("zp_svd_recoil""0.2"// recoil of weapon
  
cvar_dmg_multi register_cvar("zp_svd_dmg_multi""8"// damage multipler
  
cvar_trail register_cvar("zp_svd_trail","1"//m203 trail
  
cvar_radius register_cvar("zp_svd_rad","300")  // m203 radius 
  
cvar_damage register_cvar("zp_svd_dmg","2000"//m203 max damage
  
cvar_bonus register_cvar("zp_svd_bonus","2"//reward when kill ZM by m203
  
cvar_reload register_cvar("zp_svd_reloadtime","3.0"//m203 reload time
  
cvar_remove register_cvar("zp_svd_remove","0"//one round?
  
cvar_zoom register_cvar("zp_svd_zoom""1"// weapon zoom?
  
cvar_weapon_cost register_cvar("zp_svd_cost""50"//weapon cost
  
cvar_m203_cost register_cvar("zp_svd_m203_cost""2"//m203 cost 
  
cvar_m203_nade register_cvar("zp_svd_m203_amount""5")// m203 nade when buy
  
cvar_weapon_knock register_cvar("zp_svd_knock_power""4"// knockback power
  
cvar_enable_knock register_cvar("zp_svd_knock_enable""1"//enable knockback
  
cvar_clip register_cvar("zp_svd_clip""20"// clip of weapon 

so, have fun :D

P/S : if you find a bug, report here:D and my Eng's very bad:D

Freezet 02-01-2011 03:17

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
cool :)

dias 02-01-2011 04:21

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
Let's check it out...

teobrvt1995 02-01-2011 05:12

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
if you find a bug or error, plz report to me, i will fix it.:D

dias 02-01-2011 09:04

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
did you add this plugin to donis's server ?

teobrvt1995 02-01-2011 09:06

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
yes, I tested it in Donis's SV and work good:D

GAARA54 02-01-2011 13:24

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
3 Attachment(s)
Quote:

Originally Posted by teobrvt1995 (Post 1404411)
if you find a bug or error, plz report to me, i will fix it.:D


http://forums.alliedmods.net/attachm...1&d=1296584220


1) i Bought svdex. All right, green number show to me how many grenades i have



http://forums.alliedmods.net/attachm...1&d=1189185491


2) [FIRST BUG] i drop svdex, green number with amount of grenades should be off, but it is on 0_o

http://forums.alliedmods.net/attachm...1&d=1189185491



3) [SECOND BUG] i shoot all grenades, amount of grenades became to zero, i drop svdex, then buy new in Extra Menu... and what ? and what you can see on 3 screen

teobrvt1995 02-02-2011 00:11

Re: [ZP] Extra Item: CSO- SVDEX V:1.11( not animation )
 
update :
v1.12 : fix bug
http://vb5.upanh.com/thumbpic/19.0.2...0000.700x0.jpg
http://vb0.upanh.com/thumbpic/19.0.2...0001.700x0.jpg

dias 02-02-2011 03:55

Re: [ZP] Extra Item: CSO- SVDEX V:1.12( no animation )
 
look like good.
I think i can learn something in this plugin :up:

5c0r-|3i0 02-02-2011 05:56

Re: [ZP] Extra Item: CSO- SVDEX V:1.12( no animation )
 
1)
PHP Code:

        g_ammo[player] += 5
        client_print
(player,print_chat"You bought 5 nade for %s"weapon_name); 

Dont hardcode this , make a cvar to configurate number of nade , max grenade also .
2)
PHP Code:

if(is_user_alive(id) && !zp_get_user_zombie(id) && get_user_weapon(id) == CSW_AK47 && g_svd[id]) 

Check this before the
PHP Code:

    new button get_uc(uc_handleUC_Buttons)
    new 
ent find_ent_by_owner(-1"weapon_ak47"id)
    new 
fInReload get_pdata_int(entm_fInReload4

So these won't run if the cases are false.


3) Create a new array of g_weapon to store the weapon data , in CurWeapon event , g_weapon[id] = read_data(2) , don't use lots of get_user_weapon :|.Because you don't need those (plrClip, plrAmmo) as well.
4)
PHP Code:

        fm_give_item(player,"weapon_ak47")
        
fm_give_item(player,"ammo_9mm"// remove this 


5)
PHP Code:

g_ammo[player] = 

make a cvar for this :d

6)
PHP Code:

        for(new 0sizeof fire_soundi++)
        
emit_sound(idCHAN_AUTOfire_sound[i], 1.0ATTN_NORM0PITCH_NORM

What is this ? Play all sound in fire_sound[] ? This should be randomed :|.


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

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