Raised This Month: $ Target: $400
 0% 

[L4D2] Help with HookEvent


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BlackComb
Junior Member
Join Date: Nov 2010
Old 09-15-2012 , 15:13   [L4D2] Help with HookEvent
Reply With Quote #1

I'm trying to make the Weapon_fire be only affect if they are admin:

I have the following :

Code:
HookEvent("weapon_fire", RunOnWeaponFire);
Code:
public Action:RunOnWeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
     new client = GetClientOfUserId(GetEventInt(event, "userid"));
    if (GetUserAdmin(client) != INVALID_ADMIN_ID)
    {
      PrintToChat(client, "\x03 Testing... \x04");
    }
}
So Far the both is doing it to non-admin players too
BlackComb is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 09-15-2012 , 16:08   Re: [L4D2] Help with HookEvent
Reply With Quote #2

Code:
CheckCommandAccess(client, "", ADMFLAG_GENERIC, true);
try this.
__________________
sorry, for my poor english.
mcpan313 is offline
Send a message via MSN to mcpan313
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 10:38.


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