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

if not admin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 10-06-2008 , 21:19   if not admin
Reply With Quote #1

i know this is a noob question but how can i do an if statement like this

Code:
else if ( i == 9 && !admin)
im not sure whats the correct way to do the code for if the user is not admin
whosyourdaddy is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 10-06-2008 , 21:29   Re: if not admin
Reply With Quote #2

Code:
else if ( i == 9 && (GetUserAdmin(a) == INVALID_ADMIN_ID) )
Where a is the client you are checking
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
BAILOPAN
Join Date: Jan 2004
Old 10-06-2008 , 22:57   Re: if not admin
Reply With Quote #3

It depends on how you define "admin." Someone can have an admin entry with no administrative privileges.

The best way to check this is:

Code:
bool:IsBasicAdmin(client) {     return (GetUserFlagBits(client) & ADMFLAG_GENERIC) == ADMFLAG_GENERIC; }
__________________
egg
BAILOPAN 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 21:01.


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