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

[REQUEST] Donater connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SlayeRbe
SourceMod Donor
Join Date: Mar 2011
Location: Belgium
Old 06-20-2013 , 10:03   [REQUEST] Donater connect
Reply With Quote #1

Hello.

I had a question if someone can make a plugin for donaters.
DONATER connect announce for HINT and CENTER.
The donaters use flag O or A.

HINT and CENTER:
Code:
Donater [NAME] connected
And for the chat, you can select your own colors if you use COLORS.inc

CHAT:
A plugin that use COLORS.INC
http://forums.alliedmods.net/showthread.php?t=185016

I hope someone can make this.

Thanks guys.
SlayeRbe is offline
Psikotik
Member
Join Date: May 2013
Old 06-20-2013 , 12:54   Re: [REQUEST] Donater connect
Reply With Quote #2

TEST

PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "Dontater connected",
    
author "Psikotik",
    
description "Donater connected",
    
version "1.0",
    
url ""
}

public 
OnClientPostAdminCheck(client
{
    if (
GetUserFlagBits(client) & ADMFLAG_CUSTOM1)
    {

    new 
String:name[32];
    
GetClientName(clientname32);
    
PrintToChatAll("Donater \x04%s connected",name);
    }
    return 
true;

Psikotik is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 06-20-2013 , 13:08   Re: [REQUEST] Donater connect
Reply With Quote #3

You should always use CheckCommandAccess instead of checking individual flags.
__________________
thetwistedpanda is offline
Psikotik
Member
Join Date: May 2013
Old 06-20-2013 , 13:12   Re: [REQUEST] Donater connect
Reply With Quote #4

thank you,

Can you show me correct my code please?
Psikotik is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 06-20-2013 , 13:34   Re: [REQUEST] Donater connect
Reply With Quote #5

http://docs.sourcemod.net/api/index....d=show&id=497&

PHP Code:
Bitwise values definitions for admin flags.
#define ADMFLAG_RESERVATION            (1<<0)        /**< Convenience macro for Admin_Reservation as a FlagBit */
#define ADMFLAG_GENERIC                (1<<1)        /**< Convenience macro for Admin_Generic as a FlagBit */
#define ADMFLAG_KICK                (1<<2)        /**< Convenience macro for Admin_Kick as a FlagBit */
#define ADMFLAG_BAN                    (1<<3)        /**< Convenience macro for Admin_Ban as a FlagBit */
#define ADMFLAG_UNBAN                (1<<4)        /**< Convenience macro for Admin_Unban as a FlagBit */
#define ADMFLAG_SLAY                (1<<5)        /**< Convenience macro for Admin_Slay as a FlagBit */
#define ADMFLAG_CHANGEMAP            (1<<6)        /**< Convenience macro for Admin_Changemap as a FlagBit */
#define ADMFLAG_CONVARS                (1<<7)        /**< Convenience macro for Admin_Convars as a FlagBit */
#define ADMFLAG_CONFIG                (1<<8)        /**< Convenience macro for Admin_Config as a FlagBit */
#define ADMFLAG_CHAT                (1<<9)        /**< Convenience macro for Admin_Chat as a FlagBit */
#define ADMFLAG_VOTE                (1<<10)        /**< Convenience macro for Admin_Vote as a FlagBit */
#define ADMFLAG_PASSWORD            (1<<11)        /**< Convenience macro for Admin_Password as a FlagBit */
#define ADMFLAG_RCON                (1<<12)        /**< Convenience macro for Admin_RCON as a FlagBit */
#define ADMFLAG_CHEATS                (1<<13)        /**< Convenience macro for Admin_Cheats as a FlagBit */
#define ADMFLAG_ROOT                (1<<14)        /**< Convenience macro for Admin_Root as a FlagBit */
#define ADMFLAG_CUSTOM1                (1<<15)        /**< Convenience macro for Admin_Custom1 as a FlagBit */
#define ADMFLAG_CUSTOM2                (1<<16)        /**< Convenience macro for Admin_Custom2 as a FlagBit */
#define ADMFLAG_CUSTOM3                (1<<17)        /**< Convenience macro for Admin_Custom3 as a FlagBit */
#define ADMFLAG_CUSTOM4                (1<<18)        /**< Convenience macro for Admin_Custom4 as a FlagBit */
#define ADMFLAG_CUSTOM5                (1<<19)        /**< Convenience macro for Admin_Custom5 as a FlagBit */
#define ADMFLAG_CUSTOM6                (1<<20)        /**< Convenience macro for Admin_Custom6 as a FlagBit */ 
__________________
thetwistedpanda is offline
Psikotik
Member
Join Date: May 2013
Old 06-20-2013 , 13:40   Re: [REQUEST] Donater connect
Reply With Quote #6

I don't understand
Psikotik is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 06-20-2013 , 13:48   Re: [REQUEST] Donater connect
Reply With Quote #7

Look at other plugins then; I won't write the code for you.
__________________
thetwistedpanda is offline
Psikotik
Member
Join Date: May 2013
Old 06-20-2013 , 15:07   Re: [REQUEST] Donater connect
Reply With Quote #8

I do not care about the plugin is not for me I just wanted to help
Psikotik is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 06-21-2013 , 16:48   Re: [REQUEST] Donater connect
Reply With Quote #9

CheckCommandAccess
PHP Code:
public OnClientPostAdminCheck(client
{
    if (
CheckCommandAccess(client"my_named_command" ADMFLAG_CUSTOM1))
    {
        
PrintCenterTextAll("Donater %N connected"client);
        
PrintHintTextToAll("Donater %N connected"client);
        
PrintToChatAll("\x01Donater \x04%N \x01connected"client);
    }

__________________
Do not Private Message @me

Last edited by Bacardi; 06-21-2013 at 16:52. Reason: something like that
Bacardi 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 16:13.


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