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

Owner connected info


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Neverminddw
Junior Member
Join Date: Jul 2016
Location: Kosovo
Old 08-26-2016 , 10:06   Owner connected info
#1

Owner Connected
Author: N3vEr! MinD! D-W


This plugin is made by me, if owner ( player with access ADMIN_RCON ) connects to server, it shows this dhudmessage to them "Welcome Owner".

And 2-nd it shows all players this message on chat bar "Owner has connected".


Code:
/* owner_connected plugin made by N3vEr! MinD! D-W */

#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>

#define PLUGIN "owner_connected"
#define VERSION "1.0"
#define AUTHOR "N3vEr! MinD! D-W"


plugin_init() {
	register_plugin(owner_connected, 1.0, N3vEr! MinD! D-W)
}

public client_putinserver(id)
{
	if(is_user_bot(id)) return
	
	set_task(5.0, "adminHUD", id)
	set_task(5.0, "playerHUD", id)
}

public adminHUD(id)
{
	if (get_user_flags && ADMIN_RCON(id))
	{
		set_dhudmessage(0, 255, 0, 0.28.0, 0.13, 0, 6.0, 12.0)
		show_dhudmessage(id, "Welcome Owner!")
	}
}

public playerHUD(id)
{
	if (is_user_connected(id))
	{
		print_chat("Owner has connected!")
	}
}
Attached Files
File Type: sma Get Plugin or Get Source (Owner_Connected.sma - 781 views - 889 Bytes)

Last edited by Neverminddw; 08-26-2016 at 10:58. Reason: Mistake
Neverminddw is offline
icimaro1337
Junior Member
Join Date: Jan 2016
Location: Moldova, Chisinau
Old 08-26-2016 , 10:14   Re: Owner connected info
#2

trash...
icimaro1337 is offline
Send a message via Skype™ to icimaro1337
Neverminddw
Junior Member
Join Date: Jul 2016
Location: Kosovo
Old 08-26-2016 , 10:57   Re: Owner connected info
#3

Quote:
Originally Posted by icimaro1337 View Post
trash...
The plugin works very well, tested it.
It's fun plugin for someone that wants to use it.
Anyway, if you don't like it, no need to comment like that.
Neverminddw is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-26-2016 , 13:49   Re: Owner connected info
#4

Take time for update your plugin and make some quality work.
Your plugin work, but that not means that he can be approved here.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 08-26-2016 at 13:50.
EFFx is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 08-26-2016 , 15:13   Re: Owner connected info
#5

Works? Lol, it can't be compiled
baneado is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-26-2016 , 17:54   Re: Owner connected info
#6

Quote:
Originally Posted by baneado View Post
Works? Lol, it can't be compiled

I want to make him happy, please dont destroy it.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Neverminddw
Junior Member
Join Date: Jul 2016
Location: Kosovo
Old 08-27-2016 , 04:12   Re: Owner connected info
#7

Quote:
Originally Posted by EFFx View Post
I want to make him happy, please dont destroy it.
I've compiled the plugin at webcompiler: http://www.amxmodx.org/webcompiler.cgi
But it seriously worked on my server.
But one thing, Im new at making pawn plugins, so maybe this is damn bad and easy for you.
Can anyone give me the right code for this plugin to work correctly as I meant to do it, so I will learn making plugins from here.
Neverminddw is offline
question
Junior Member
Join Date: Aug 2016
Old 08-27-2016 , 05:30  
#8

Why're you defying "PLUGIN", "AUTHOR" and "VERSION", then, in "register_plugin", you don't use them?
question is offline
Send a message via Skype™ to question
icimaro1337
Junior Member
Join Date: Jan 2016
Location: Moldova, Chisinau
Old 08-27-2016 , 07:17   Re: Owner connected info
#9

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "owner_connected"
#define VERSION "1.0"
#define AUTHOR "N3vEr! MinD! D-W"

#define FLAG ADMIN_RCON

new g_hudsyncobj;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
    
g_hudsyncobj CreateHudSyncObj();
}
public 
client_putinserver(id)
{
    if (
get_user_flags(id) & FLAG)
        
set_task(5.0"taskOwnerConnected"id 1337);
}
public 
client_disconnect(id)
{
    if (
task_exists(id 1337))
        
remove_task(id 1337);
}
public 
taskOwnerConnected(id)
{
    
id -= 1337;
    
    
set_hudmessage(02550, -1.00.350_3.0__, -1);
    
ShowSyncHudMsg(idg_hudsyncobj"Welcome Owner!");
    
    new 
players[32], num;
    
get_players(playersnum"ch");
    
    if (
num 1)
    {
        new 
name[32];
        
get_user_name(idnamecharsmax(name));
        
        new 
iplayer;
        
        for (
0numi++)
        {
            
player players[i];
            
            if (
player == id)
                continue;
            
            
set_hudmessage(02550, -1.00.350_3.0__, -1);
            
ShowSyncHudMsg(playerg_hudsyncobj"Owner %s connected!"name);
        }
    }

this should work...
icimaro1337 is offline
Send a message via Skype™ to icimaro1337
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-27-2016 , 14:38   Re: Owner connected info
#10

I don't know jack about amxx admin, because I've never used it, but this part doesn't look correct:

PHP Code:
public adminHUD(id)
{
    if (
get_user_flags && ADMIN_RCON(id))
    {
        
set_dhudmessage(025500.28.00.1306.012.0)
        
show_dhudmessage(id"Welcome Owner!")
    }

Wouldn't it be:

PHP Code:
public adminHUD(id)
{
    if (
get_user_flags(id) & ADMIN_RCON)
    {
        
set_dhudmessage(025500.28.00.1306.012.0)
        
show_dhudmessage(id"Welcome Owner!")
    }

__________________
Bad_Bud is offline
Closed Thread



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 10:27.


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