Raised This Month: $32 Target: $400
 8% 

Simple Plugin Request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Grav3yardman
Member
Join Date: Oct 2021
Old 11-28-2021 , 07:09   Simple Plugin Request
Reply With Quote #1

I want a plugin that shows when some VIP (ADMIN_LEVEL_H) (Flag t) enters the server.This message should be green and displayed in the lower left corner.
Grav3yardman is offline
Old 11-28-2021, 07:29
Sreaper
This message has been deleted by Sreaper. Reason: realized this is for amx mod and not sourcemod
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 11-28-2021 , 07:56   Re: Simple Plugin Request
Reply With Quote #2

Alright !

PHP Code:
#include <amxmodx>
#include <cromchat>

new const szPLUGIN[] = "Welcome Message"szVERSION[] = "1.0"szAUTHOR[] = "YusoChan-";

new 
g_pPrefix[40];

public 
plugin_init() {
    
register_plugin(szPLUGIN,szVERSION,szAUTHOR);
    
CC_SetPrefix("&x01[&x04WELCOME&x01]");
}

public 
client_connect(id) {
    
    
set_task(3.0"Welcome"id);
}

public 
Welcome(id) {
    new 
szName[32];
    
get_user_name(idszNamecharsmax(szName));
    
//Message:
    
CC_SendMessage(id"%s &x03Hello sir &x01%s !"g_pPrefixszName);

__________________
<b>IP : <font color=Red>93.115.53.168:27017</font></b>
<b>Founder : <font color=Cyan>YusoChan-</font></b>
Yusochan is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 11-28-2021 , 08:33   Re: Simple Plugin Request
Reply With Quote #3

Quote:
Originally Posted by Yusochan View Post
Alright !

PHP Code:
#include <amxmodx>
#include <cromchat>

new const szPLUGIN[] = "Welcome Message"szVERSION[] = "1.0"szAUTHOR[] = "YusoChan-";

new 
g_pPrefix[40];

public 
plugin_init() {
    
register_plugin(szPLUGIN,szVERSION,szAUTHOR);
    
CC_SetPrefix("&x01[&x04WELCOME&x01]");
}

public 
client_connect(id) {
    
    
set_task(3.0"Welcome"id);
}

public 
Welcome(id) {
    new 
szName[32];
    
get_user_name(idszNamecharsmax(szName));
    
//Message:
    
CC_SendMessage(id"%s &x03Hello sir &x01%s !"g_pPrefixszName);

#define VIP_FLAG ADMIN_LEVEL_H

get_user_flags(id) && VIP_FLAG )*
SHIFT0 is offline
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 11-28-2021 , 09:56   Re: Simple Plugin Request
Reply With Quote #4

Quote:
Originally Posted by SHIFT0 View Post
#define VIP_FLAG ADMIN_LEVEL_H

get_user_flags(id) && VIP_FLAG )*
Lmao, yeah i forgot it

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

#include <amxmodx>
#include <cromchat>

#define ADMINACCESS     ADMIN_LEVEL_H

new const szPLUGIN[] = "Welcome Message"szVERSION[] = "1.0"szAUTHOR[] = "YusoChan-";

new 
g_pPrefix[40];

public 
plugin_init() {
    
register_plugin(szPLUGIN,szVERSION,szAUTHOR);
    
CC_SetPrefix("&x01[&x04WELCOME&x01]");
}

public 
client_connect(id) {
    
    
set_task(3.0"Welcome"id);
}

public 
Welcome(id) {
    if(!
is_user_connected(id) || !is_user_vip(id))
    {
        new 
szName[32];
        
get_user_name(idszNamecharsmax(szName));
        
//Message:
        
CC_SendMessage(id"%s &x03Hello sir &x01%s !"g_pPrefixszName);
    }
}

bool:is_user_vip(id)
    return !!(
get_user_flags(id) & ADMINACCESS
__________________
<b>IP : <font color=Red>93.115.53.168:27017</font></b>
<b>Founder : <font color=Cyan>YusoChan-</font></b>

Last edited by Yusochan; 11-28-2021 at 10:01.
Yusochan is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 11-28-2021 , 14:46   Re: Simple Plugin Request
Reply With Quote #5

Quote:
Originally Posted by Yusochan View Post
Lmao, yeah i forgot it

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

#include <amxmodx>
#include <cromchat>

#define ADMINACCESS     ADMIN_LEVEL_H

new const szPLUGIN[] = "Welcome Message"szVERSION[] = "1.0"szAUTHOR[] = "YusoChan-";

new 
g_pPrefix[40];

public 
plugin_init() {
    
register_plugin(szPLUGIN,szVERSION,szAUTHOR);
    
CC_SetPrefix("&x01[&x04WELCOME&x01]");
}

public 
client_connect(id) {
    
    
set_task(3.0"Welcome"id);
}

public 
Welcome(id) {
    if(!
is_user_connected(id) || !is_user_vip(id))
    {
        new 
szName[32];
        
get_user_name(idszNamecharsmax(szName));
        
//Message:
        
CC_SendMessage(id"%s &x03Hello sir &x01%s !"g_pPrefixszName);
    }
}

bool:is_user_vip(id)
    return !!(
get_user_flags(id) & ADMINACCESS
Good !
SHIFT0 is offline
Grav3yardman
Member
Join Date: Oct 2021
Old 11-29-2021 , 03:49   Re: Simple Plugin Request
Reply With Quote #6

Sorry but I forgot to add that the message should be HUD green message in lower left corner.
My mistake
Example: VIP "name" has connected to server

Last edited by Grav3yardman; 11-29-2021 at 03:52.
Grav3yardman is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 11-29-2021 , 11:28   Re: Simple Plugin Request
Reply With Quote #7

Quote:
Originally Posted by Grav3yardman View Post
Sorry but I forgot to add that the message should be HUD green message in lower left corner.
My mistake
Example: VIP "name" has connected to server
#include <amxmodx>
#include <geoip>
#include <csx>
#include <dhudmessage>

#define PLUGIN "Hud Message Connect"
#define VERSION "1.0"
#define AUTHOR "null."

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(id)
{
set_task(5.0, "HudConnectInfo", id)
}
public HudConnectInfo(id)
{
new stats[ 8 ], body[ 8 ]
new rank_pos = get_user_stats( id, stats, body )
new rank_max = get_statsnum( )
get_user_name(id, szName, charsmax(szName))

set_dhudmessage(0, 128, 0)
show_dhudmessage(id, "Welcome VIP %s has Connected to Server", szName);
}
SHIFT0 is offline
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 11-29-2021 , 12:40   Re: Simple Plugin Request
Reply With Quote #8

Huh ?!

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

#include <amxmodx>
#include <cromchat>

#define ADMINACCESS     ADMIN_LEVEL_H

new const szPLUGIN[] = "Welcome Message"szVERSION[] = "1.0"szAUTHOR[] = "YusoChan-";

new 
g_pPrefix[40];

public 
plugin_init() {
    
register_plugin(szPLUGIN,szVERSION,szAUTHOR);
    
    
CC_SetPrefix("&x01[&x04V.IP.&x01]");
}

public 
client_connect(id) {
    
    
set_task(3.0"Welcome"id);
}

public 
Welcome(id) {
    if(!
is_user_connected(id) || !is_user_vip(id))
    {
        new 
szName[32];
        
get_user_name(idszNamecharsmax(szName));
        
//Hud Message:
        
set_hudmessage(44150210.060.60, .effects, .holdtime5.0);
        
show_hudmessage(0"%s &x01%s &x03Connected to server&x01.");
    }
}

bool:is_user_vip(id)
    return !!(
get_user_flags(id) & ADMINACCESS
__________________
<b>IP : <font color=Red>93.115.53.168:27017</font></b>
<b>Founder : <font color=Cyan>YusoChan-</font></b>

Last edited by Yusochan; 11-29-2021 at 12:42.
Yusochan is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-29-2021 , 18:31   Re: Simple Plugin Request
Reply With Quote #9

This plugin doesn't even make sense, it uses cromchat and setprefix but it never sends it as it only uses hudmessage it uses color formatting in the HUD that doesn't even accept formatting, uses string formatting for the player name but doesn't put the variable, the vip or connected check is reversed, the plugin doesn't even work, pay more attention.

Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
Code:
#include <amxmodx>

#define ADMINACCESS     ADMIN_LEVEL_H

#define szPLUGIN "Welcome Message"
#define szVERSION "1.0"
#define szAUTHOR "Alliedmodders"

#define is_user_vip(%0) get_user_flags(%0) & ADMINACCESS

new const g_pPrefix[] = "[V.IP.]"

public plugin_init()
{
        register_plugin(szPLUGIN,szVERSION,szAUTHOR);
}

public client_putinserver(id)
{
        if(is_user_vip(id))
        {
                set_task(3.0, "Welcome", id)
        }
}

public Welcome(id)
{
        if(is_user_connected(id))
        {
                new szName[32];
                get_user_name(id, szName, charsmax(szName))
                //Hud Message:

                set_hudmessage(0, 255, 0, 0.1, 0.7, .effects = 0, .fxtime = 0.1, .holdtime = 5.0, .fadeintime = 0.1, .fadeouttime = 0.1, .channel = -1)
                show_hudmessage(0, "%s %s Connected to server.", g_pPrefix, szName)
        }
}
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 11-30-2021 at 07:46.
iceeedr is offline
Send a message via Skype™ to iceeedr
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 11-30-2021 , 07:40   Re: Simple Plugin Request
Reply With Quote #10

Quote:
Originally Posted by iceeedr View Post
This plugin doesn't even make sense, it uses cromchat and setprefix but it never sends it as it only uses hudmessage it uses color formatting in the HUD that doesn't even accept formatting, uses string formatting for the player name but doesn't put the variable, the vip or connected check is reversed, the plugin doesn't even work, pay more attention.



Code:
#include <amxmodx>

#define ADMINACCESS     ADMIN_LEVEL_H

#define szPLUGIN "Welcome Message"
#define szVERSION "1.0"
#define szAUTHOR "Alliedmodders"

#define is_user_vip(%0) get_user_flags(%0) & ADMINACCESS

new const g_pPrefix[] = "[V.IP.]"

public plugin_init()
{
        register_plugin(szPLUGIN,szVERSION,szAUTHOR);
}

public client_putinserver(id)
{
        if(is_user_vip(id))
        {
                set_task(10.0, "Welcome", id)
        }
}

public Welcome(id)
{
        if(is_user_connected(id))
        {
                new szName[32];
                get_user_name(id, szName, charsmax(szName))
                //Hud Message:

                set_hudmessage(0, 255, 0, 0.1, 0.7, .effects = 0, .fxtime = 0.1, .holdtime = 5.0, .fadeintime = 0.1, .fadeouttime = 0.1, .channel = -1)
                show_hudmessage(0, "%s %s Connected to server.", g_pPrefix, szName)
        }
}
Thanks ! it's very helpful
__________________
<b>IP : <font color=Red>93.115.53.168:27017</font></b>
<b>Founder : <font color=Cyan>YusoChan-</font></b>
Yusochan is offline
Reply


Thread Tools
Display Modes

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:06.


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