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

Make admconmsg announce specific user


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Polartop
Member
Join Date: Apr 2011
Old 04-14-2012 , 10:54   Make admconmsg announce specific user
Reply With Quote #1

Hello, I'm trying to make my server say "Server owner polartop has connected D:" But i'm not good at coding, I tried to rewrite the plugin but i didn't work, Heres my current admconmsg.sp file
PHP Code:
#include <sourcemod>
#define PLUGIN_VERSION "0.0.3"
public Plugin:myinfo 
{
    
name "AdminConnectmsg",
    
author "R-Hehl",
    
description "Shows players connecting admins",
    
version PLUGIN_VERSION,
    
url "http://www.compactaim.de/"
};
public 
OnPluginStart()
{
    
// Create the rest of the cvar's
    
CreateConVar("sm_admin_conmsg_version"PLUGIN_VERSION"Admin Connect MSG Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
}
public 
OnClientPostAdminCheck(client
{
    new 
AdminId:id GetUserAdmin(client);
    if (
id != INVALID_ADMIN_ID)
    {
    new 
String:name[32];
    
GetClientName(clientname32);
    
PrintCenterTextAll("Admin %s connected, RUN FOR YOUR LIVES! D:",name);
    }
    return 
true;

Polartop is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-14-2012 , 13:28   Re: Make admconmsg announce specific user
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?p=1591313

or

PHP Code:

#include <sourcemod> 
#define PLUGIN_VERSION "0.0.3" 
public Plugin:myinfo =  

    
name "AdminConnectmsg"
    
author "R-Hehl"
    
description "Shows players connecting admins"
    
version PLUGIN_VERSION
    
url "http://www.compactaim.de/" 
}; 
public 
OnPluginStart() 

    
// Create the rest of the cvar's 
    
CreateConVar("sm_admin_conmsg_version"PLUGIN_VERSION"Admin Connect MSG Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); 

public 
OnClientPostAdminCheck(client)  

    
//new AdminId:id = GetUserAdmin(client); 
    
if (CheckCommandAccess(client"admin_announce"ADMFLAG_ROOT)) 
    { 
    
//new String:name[32]; 
    //GetClientName(client, name, 32); 
    
PrintCenterTextAll("Admin %N connected, RUN FOR YOUR LIVES! D:"client); // This is long, maybe make it like the next line
    //PrintCenterTextAll("Admin %N connected\nRUN FOR YOUR LIVES! D:", client);
    
}

__________________
View my Plugins | Donate

Last edited by TnTSCS; 04-15-2012 at 11:16.
TnTSCS is offline
Polartop
Member
Join Date: Apr 2011
Old 04-15-2012 , 06:51   Re: Make admconmsg announce specific user
Reply With Quote #3

I see the generic admin flag, Shoulden't it be a flag only i have like the z flag?
Polartop is offline
Polartop
Member
Join Date: Apr 2011
Old 04-15-2012 , 07:57   Re: Make admconmsg announce specific user
Reply With Quote #4

I want it to onny announced me, the owner
Polartop is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-15-2012 , 11:16   Re: Make admconmsg announce specific user
Reply With Quote #5

Then change it to be ADMFLAG_ROOT - http://docs.sourcemod.net/api/index....ad=file&id=28&

I changed my post above.
__________________
View my Plugins | Donate

Last edited by TnTSCS; 04-15-2012 at 11:18.
TnTSCS 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 06:53.


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