Raised This Month: $ Target: $400
 0% 

Solved How to use multi variables with one enum !!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 10-30-2021 , 15:20   How to use multi variables with one enum !!
Reply With Quote #1

Is it possible to use multi variables with one enum ? Like this :

PHP Code:
enum pData
{
    
Health,
    
Armor,
    
Speed,
    
Gravity,
    
Knockback,
    
MultiJump
}

new 
g_iUser33 ][ pData ]
new 
g_iCvarpData ]

public 
plugin_init() 
{
    
g_iCvarKnockback ] = register_cvar("amx_knockback""300.0")
}

public 
OnTakeDamage(iVictimiInflictoriAttackerFloat:flDamagebitsDamageType)
{
    if (!
is_user_connectediVictim ) || !is_user_connectediAttacker ) )
        return 
HAM_IGNORED
    

    
new Float:fOrigin[3]
    
pev iAttackerpev_originfOrigin )
    
Set_KnockbackiVictimfOriging_iUser][ Knockback ] ? ( Float:g_iUseriVictim ][ Knockback ] ) : get_pcvar_numg_iCvarKnockback ] ), 2)
    return 
HAM_IGNORED

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 10-31-2021 at 17:42.
Supremache is offline
 



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 11:39.


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