Raised This Month: $ Target: $400
 0% 

Function Has_Flag Explication


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
. ThePro
Junior Member
Join Date: Dec 2011
Old 12-23-2011 , 13:07   Re: Function Has_Flag Explication
Reply With Quote #1

joshknifer, Thanks buddy, I'll take a look.
fysiks, So if I use it's fine, see the example in a menu:

Quote:
public Cmd_Forum(id)
{
if(has_Used[id])
return HAM_IGNORED

if (has_flag(id, "a"))
{
new menu = menu_create("\yDescription","ShowMenuPlayer", 0)
menu_additem(menu,"\r\wDescription Case","1",0,-1)
}
return PLUGIN_HANDLED;
}
. ThePro is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-23-2011 , 13:12   Re: Function Has_Flag Explication
Reply With Quote #2

Quote:
Originally Posted by . ThePro View Post
joshknifer, Thanks buddy, I'll take a look.
fysiks, So if I use it's fine, see the example in a menu:

PHP Code:
public Cmd_Forum(id)
{
    if(
has_Used[id])
        return 
HAM_IGNORED

    
if(has_flag(id"a"))
    {
        new 
menu menu_create("\yDescription","ShowMenuPlayer"0)
        
menu_additem(menu,"\r\wDescription Case","1",0,-1)
    }
    return 
PLUGIN_HANDLED

If you use it with only one flag then it's the same as, but less efficient than, using:

PHP Code:
if( get_user_flags(id) & ADMIN_IMMUNITY 
Tip: Don't use HAM_ return values unless it is inside a Ham function. You should use PLUGIN_HANDLED where you are currently using a Ham return value.
__________________
fysiks 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 20:44.


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