Raised This Month: $ Target: $400
 0% 

References for custom ranking system?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 05-21-2013 , 11:53   Re: References for custom ranking system?
Reply With Quote #1

Quote:
Originally Posted by didoWEE View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new g_iMaxPlayers;

public 
plugin_init()
{
       
g_iMaxPlayers get_maxplayer();
       
RegisterHam(Ham_Weapon_PrimaryAttack"player""BulletFired"0); // Bullet Fired forward
       
RegisterHam(Ham_TakeDamage"player""BulletHit"1); // Bullet Hit forward
}

public 
BulletHit(victiminflictorattackerFloat:damagedamage_bit)
{
    if(
attacker && attacker <= g_iMaxPlayers)
    {
        
// Bullet Hit is made (by attacker)
        // Add your code here
    
}
}

public 
BulletFired(ent)
{
    static 
idid pev(entpev_owner);
    static 
iClipiAmmo;
    static 
iWeaponiWeapon get_user_weapon(idiClipiAmmo);
    
    if(
iWeapon == CSW_KNIFE) return HAM_IGNORED;
    if(
iWeapon == CSW_HEGRENADE) return HAM_IGNORED;
    if(
iWeapon == CSW_SMOKEGRENADE) return HAM_IGNORED;
    if(
iWeapon == CSW_FLASHBANG) return HAM_IGNORED;
    if(
iWeapon == CSW_C4) return HAM_IGNORED;
    
    
// If this isn't working, replace iClip with iAmmo
    
if(iClip == 0) return HAM_IGNORED;
    
    
// Bullet Fire is made
    // Add your code here

How is it now
didoWEE 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 16:28.


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