Raised This Month: $ Target: $400
 0% 

I want Only admins can use this plugin but I can't help pls


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-02-2014 , 17:37   Re: I want Only admins can use this plugin but I can't help pls
Reply With Quote #1

PHP Code:
public can(player) {
    if(
get_user_flags(player) & FLAG)
    {
        
get_players(playerspnum);
    
        for(new 
0pnumi++)
        {   
            
tempid players[i];
            if(
get_user_team(tempid) == && is_user_alivetempid ))
            {
                
set_user_health(tempid100)
            }
        }
    }


PHP Code:
public can(player) {
    if(
get_user_flags(player) & FLAG)
    {
        
get_players(playerspnum"ae""TERRORIST");
    
        for(new 
0pnumi++)
        {   
            
tempid players[i];
            
set_user_health(tempid100)
        }
    }


Last edited by mottzi; 07-02-2014 at 17:37.
mottzi is offline
Send a message via MSN to mottzi
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-03-2014 , 04:31   Re: I want Only admins can use this plugin but I can't help pls
Reply With Quote #2

Why no one is using this way of setting levels of commands ?

PHP Code:
register_clcmd("say /something","cmdSomething",ADMIN_KICK,"- displays Something menu"
PHP Code:
public cmdSomething(id,level,cid) {
if (!
cmd_access(id,level,cid,1))
    return 
PLUGIN_HANDLED //Block if no access 
 
//Do the work if player has access

__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then
devilicioux 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:15.


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