Raised This Month: $ Target: $400
 0% 

decalfrequency 0 for vip/admins only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trigger
New Member
Join Date: Apr 2009
Old 04-24-2009 , 09:08   decalfrequency 0 for vip/admins only
Reply With Quote #1

Well I need some help here.
I wonder if there is a plugin for vip or admins so them can use "decalfrequency 0" but the other on server can't?
decalfrequency 0 doing so you can spray all the time.
Trigger is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-24-2009 , 10:18   Re: decalfrequency 0 for vip/admins only
Reply With Quote #2

Try this :

PHP Code:
/*    Copyright © 2009, ConnorMcLeod

    Admin Spray is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Admin Spray; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#define FLAG_ADMIN_SPRAY        ADMIN_LEVEL_A

#include <amxmodx>
#include <engine>
#include <fakemeta>

#define PLUGIN "Admin Spray"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define MAX_PLAYERS    32

#define m_flNextDecalTime 486

new g_bAdmin[MAX_PLAYERS+1]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_impulse(201"Player_Spray")
}

public 
client_authorized(id)
{
    
g_bAdmin[id] = !!(get_user_flags(id) & FLAG_ADMIN_SPRAY)
}

public 
Player_Spray(id)
{
    if( 
g_bAdmin[id] )
    {
        
set_pdata_float(idm_flNextDecalTime0.0)
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Trigger
New Member
Join Date: Apr 2009
Old 04-24-2009 , 10:29   Re: decalfrequency 0 for vip/admins only
Reply With Quote #3

Nice that works for admin

will it work for vip to ? i have this vi vip plugin
http://forums.alliedmods.net/showthread.php?p=679629
Trigger is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-24-2009 , 10:42   Re: decalfrequency 0 for vip/admins only
Reply With Quote #4

Change the access level.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Trigger
New Member
Join Date: Apr 2009
Old 04-24-2009 , 11:10   Re: decalfrequency 0 for vip/admins only
Reply With Quote #5

Okej Ty alote
Trigger is offline
That-1-Ninja
Junior Member
Join Date: Jul 2010
Old 07-28-2010 , 23:39   Re: decalfrequency 0 for vip/admins only
Reply With Quote #6

wut do u do with the php..... lol yes im a noob i know ^_^
That-1-Ninja is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-29-2010 , 00:21   Re: decalfrequency 0 for vip/admins only
Reply With Quote #7

Connor, I have never seen this before:
PHP Code:
g_bAdmin[id] = !!(get_user_flags(id) & FLAG_ADMIN_SPRAY
What does the "!!" do?
RedRobster is offline
That-1-Ninja
Junior Member
Join Date: Jul 2010
Old 07-29-2010 , 00:49   Re: decalfrequency 0 for vip/admins only
Reply With Quote #8

soo wut do i do with this php where does it go?
That-1-Ninja is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-29-2010 , 01:24   Re: decalfrequency 0 for vip/admins only
Reply With Quote #9

Quote:
Originally Posted by RedRobster View Post
Connor, I have never seen this before:
PHP Code:
g_bAdmin[id] = !!(get_user_flags(id) & FLAG_ADMIN_SPRAY
What does the "!!" do?
Sets a value to 0 or 1 instead of 0 or ANY VALUE, so !!x is like doing bool


Quote:
Originally Posted by That-1-Ninja View Post
soo wut do i do with this php where does it go?
php tag is used but this is pawn code you have to compile.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-29-2010 , 02:17   Re: decalfrequency 0 for vip/admins only
Reply With Quote #10

Ight. Thanks.
RedRobster 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 22:34.


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