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

[ZP] How To Add Sprites On Knife Mnu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Anurag Kumar
Junior Member
Join Date: Jan 2018
Location: India - Delhi
Old 02-09-2018 , 09:17   [ZP] How To Add Sprites On Knife Mnu
Reply With Quote #1

Hey Guys,

Today I Will Tell how to add sprites knife your knife menu

Link Download Knife menu Which i'll Use now
!!

For Example : I will Add Sprite For Hammer Knife ...
Follow My All Step Well You will learn it

Step 1 : Open Your Knife Menu Sma
After This : #include <zombieplague>

Add This Line

PHP Code:
new bool:g_fRoundEnd



#define TASK_FBURN                100

#define ID_FBURN                  (taskid - TASK_FBURN)



#define FIRE_DURATION            20

#define FIRE_DAMAGE              150



new g_flameSprg_burning_duration[33
Step 2 :
Find This
public plugin_precache()
precache_sound(hammer_sounds)

After Add This:

PHP Code:
g_flameSpr precache_model("sprites/Your Sprite Name.spr"
Step 3 :
Find
PHP Code:
public fw_TakeDamage 
Here we Can Choose For Which Knife We will Add The Sprite
I'll Choose Hammer To Add Sprite

PHP Code:
SetHamParamFloat(4damage get_pcvar_float(cvar_knife_hammer_dmg)) 
After This Line Add This:-

PHP Code:
if(!task_exists(victim+TASK_FBURN))

                  {

g_burning_durationvictim ] += 10

set_task
(0.1"CTask__BurningFlame"victim+TASK_FBURN__"b")

             } 
Step 4 :
Add This in The Last Of Sma Code :


PHP Code:
public CTask__BurningFlame(taskid)

{

        
// Get Player Origin and Flags

    
static origin[3], flags

    get_user_origin
(ID_FBURNorigin)

    
flags pev(ID_FBURNpev_flags)



        
// Madness mode - in water - burning stopped

    
if ((flags &ampFL_INWATER) || g_burning_duration[ID_FBURN] < || !is_user_alive(ID_FBURN))

    {

        
remove_task(taskid)

        return

    }

    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)

    
write_byte(TE_SPRITE// TE id

    
write_coord(origin[0]+random_num(-55)) // X

    
write_coord(origin[1]+random_num(-55)) // Y

    
write_coord(origin[2]+random_num(-1010)) // Z

    
write_short(g_flameSpr// Sprite

    
write_byte(2// Scale

    
write_byte(200//Brightness

    
message_end()



    
g_burning_duration[ID_FBURN]--



Last edited by Anurag Kumar; 02-09-2018 at 09:20.
Anurag Kumar 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 19:51.


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