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

[request] can any one fix code for this small plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-18-2017 , 08:25   [request] can any one fix code for this small plugin
Reply With Quote #1

Plz fix problem in this plugin, i dont know what is the problem but hud is not coming full it starts and stops in between.

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < csx >
#include <colorchat>
#include <dhudmessage>

//#define HuD_effects random(256), random(256), random(256), 0.09, 0.27, 2 , 1.0, 8.0
#define HuD_effects 0, 170, 255, 0.09, 0.27, 2, 1.0, 15.0

new const Msg[] = "Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d";

public 
plugin_init( )
{
    
register_plugin"Welcome Message""1""$[K]Y~" )    
}

public 
client_putinserverid )
{
    
set_task10.0"InfoHud"id )
    
set_task5.0"adminHUD"id )
}

public 
InfoHud(id)
{
    new 
stats], body], hostname64 ], name32 ]
    new 
rank_pos get_user_statsidstatsbody )
    new 
rank_max get_statsnum( )
    
    
get_cvar_string"hostname"hostname63 )
    
get_user_nameidname31 )
    
    
set_dhudmessageHuD_effects )
    
show_dhudmessageidMsgnamehostnamerank_posrank_max )
}
public 
adminHUD(id)
{
    if (
is_user_admin(id))
    {
        
client_print_color(idGREY"^3Welcome Pro ^4ADMIN :D");
    }

__________________

Last edited by Sanjay Singh; 02-18-2017 at 09:13.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 02-18-2017 , 12:59   Re: [request] can any one fix code for this small plugin
Reply With Quote #2

use this its working

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>
#include <colorchat>
#include <dhudmessage>

// #define HuD_effects random(256), random(256), random(256), 0.09, 0.27, 2 , 1.0, 8.0
// #define HuD_effects 0, 170, 255, 0.09, 0.27, 2, 1.0, 15.0

// new const Msg[] = "Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d";

public plugin_init( )
{
    
register_plugin"Welcome Message""1""$[K]Y~" )    
}

public 
client_putinserverid )
{
    
set_task10.0"InfoHud"id )
    
set_task5.0"adminHUD"id )
}

public 
InfoHud(id)
{
    new 
stats], body], hostname64 ], name32 ]
    new 
rank_pos get_user_statsidstatsbody )
    new 
rank_max get_statsnum( )
    
    
get_cvar_string"hostname"hostname63 )
    
get_user_nameidname31 )
    
    
set_dhudmessage(01702550.090.2721.015.0)
    
show_dhudmessage(id"Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d",namehostnamerank_posrank_max)
}
public 
adminHUD(id)
{
    if (
is_user_admin(id))
    {
        
ColorChat(idGREY"^3Welcome Pro ^4ADMIN :D");
    }

shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-18-2017 , 17:32   Re: [request] can any one fix code for this small plugin
Reply With Quote #3

You changed nothing.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-18-2017 , 17:34   Re: [request] can any one fix code for this small plugin
Reply With Quote #4

he comment these 2 lines :
PHP Code:
// #define HuD_effects 0, 170, 255, 0.09, 0.27, 2, 1.0, 15.0 

// new const Msg[] = "Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d"; 
and he did set the hud messages in InfoHud function :
PHP Code:
    set_dhudmessage(01702550.090.2721.015.0
    
show_dhudmessage(id"Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d",namehostnamerank_posrank_max 

Last edited by yas17sin; 02-18-2017 at 17:37.
yas17sin is offline
Send a message via ICQ to yas17sin
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-19-2017 , 07:11   Re: [request] can any one fix code for this small plugin
Reply With Quote #5

@shehzad what is a diffrence between my code and ur changed code, can u explain me? -_-
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-19-2017 , 07:49   Re: [request] can any one fix code for this small plugin
Reply With Quote #6

Quote:
Originally Posted by yas17sin View Post
he comment these 2 lines :
PHP Code:
// #define HuD_effects 0, 170, 255, 0.09, 0.27, 2, 1.0, 15.0 

// new const Msg[] = "Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d"; 
and he did set the hud messages in InfoHud function :
PHP Code:
    set_dhudmessage(01702550.090.2721.015.0
    
show_dhudmessage(id"Welcome %s To %s^nWe hope You EnJoy Playing Here^n^nYour rank is %d / %d",namehostnamerank_posrank_max 
That's equal to changing nothing.

@OP: there's nothing wrong with the code and it works just fine - http://i.imgur.com/Bu47WSC.jpg
Your problem is from having too many plugins that use HUD messages or you have one that's removing them or something else. It can't be fixed by editing this one.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 02-19-2017 , 08:33   Re: [request] can any one fix code for this small plugin
Reply With Quote #7

but working for me bro
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-19-2017 , 09:25   Re: [request] can any one fix code for this small plugin
Reply With Quote #8

It was working before as well. Don't change things if you don't know what they do.
__________________

Last edited by OciXCrom; 02-19-2017 at 09:25.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 02-19-2017 , 09:28   Re: [request] can any one fix code for this small plugin
Reply With Quote #9

ok -_-!
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
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 03:39.


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