Raised This Month: $ Target: $400
 0% 

[REQ] Execute ham x times


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 01-28-2017 , 21:17   [REQ] Execute ham x times
Reply With Quote #1

I have a little plugin which triggers button by simply shooting at him, however I need to limit trigger count.

After x shots, player won't be able to trigger button anymore. Count to restart on new round

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>

public plugin_init()
{
    
RegisterHam(Ham_TraceAttack"func_button""Ham_UseButton")
}



public 
Ham_UseButtoniEntiAttackerFloat:fDamageFloat:vDirection[3], TraceHandleiDamageBits 
{
    if(!
is_valid_ent(iEnt) || !is_user_alive(iAttacker) || get_user_flags(iAttacker) & ADMIN_RESERVATION)
        return;

    
ExecuteHamB(Ham_TouchiEntiAttacker)
    
entity_set_float(iEntEV_FL_frame0.0)


__________________
Airkish is offline
 


Thread Tools
Display Modes

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 20:58.


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