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

Dhud in Ultimate Bans :D


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xExperienced
Member
Join Date: Jun 2017
Location: USA
Old 07-25-2017 , 04:21   Dhud in Ultimate Bans :D
Reply With Quote #1

I want to use Dhud in Ultimate bans with colorchat.
Whenever someone get banned it should show colorchat as well as dhud message.

Will my code work? ? Please guide me in improving the code.

Here's the original code :

Code:
get_user_authid(Target[i],AuthID1,charsmax(AuthID1));
			get_user_ip(Target[i],IP1,charsmax(IP1),1);
			get_user_name(Target[i],Name1,charsmax(Name1));
			formatex(func_buffer,charsmax(func_buffer),"^x03 %s^x04 BANNED^x03 %s%s^x04 ^nBy Admin : ^x03 %s.^x01 ^n[ ^x04Reason - ^"%s^" ^x01]",Name1,is_permanent?"Permanently":"for ",STR_Duration,id?Name2:"RCON/Server",ARG_Reason);
			set_task(handle_delay,"ChatPrint",80085,func_buffer,charsmax(func_buffer));
For Dhud support I edited it as like this :

Code:
get_user_authid(Target[i],AuthID1,charsmax(AuthID1));
			get_user_ip(Target[i],IP1,charsmax(IP1),1);
			get_user_name(Target[i],Name1,charsmax(Name1));
			formatex(func_buffer,charsmax(func_buffer),"^^x03 %s^x04 BANNED^x03 %s%s^x04 ^nBy Admin : ^x03 %s.^x01 ^n[ ^x04Reason - ^"%s^" ^x01]",Name1,is_permanent?"Permanently":"for ",STR_Duration,id?Name2:"RCON/Server",ARG_Reason);
			set_task(handle_delay,"ChatPrint",80085,func_buffer,charsmax(func_buffer));
			set_dhudmessage(255, 255, 212, 0.03, 0.23, 0, 6.0, 12.0)
			show_dhudmessage(0, "%s has been Banned.^nDuration : %s%s ^nBy Admin : %s ^nReason : %s"),Name1,is_permanent?"Permanently":"for ",STR_Duration,id?Name2:"RCON/Server",ARG_Reason);

Last edited by xExperienced; 07-26-2017 at 09:33.
xExperienced is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 07-25-2017 , 11:44   Re: Dhud in Ultimate Bans :D
Reply With Quote #2

try this

PHP Code:
get_user_authid(Target[i],AuthID1,charsmax(AuthID1));
            
get_user_ip(Target[i],IP1,charsmax(IP1),1);
            
get_user_name(Target[i],Name1,charsmax(Name1));
            
formatex(func_buffer,charsmax(func_buffer),"^^x03 %s^x04 BANNED^x03 %s%s^x04 ^nBy Admin : ^x03 %s.^x01 ^n[ ^x04Reason - ^"%s^" ^x01]",Name1,is_permanent?"Permanently":"for ",STR_Duration,id?Name2:"RCON/Server",ARG_Reason);
            
set_task(handle_delay,"ChatPrint",80085,func_buffer,charsmax(func_buffer));
            
set_dhudmessage(2552552120.030.2306.012.0)
            
show_dhudmessage(id"%s has been Banned.^nDuration : %s ^nBy Admin : %s ^nReason : %s"Name1STR_DurationName2ARG_Reason); 
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
xExperienced
Member
Join Date: Jun 2017
Location: USA
Old 07-26-2017 , 08:43   Re: Dhud in Ultimate Bans :D
Reply With Quote #3

Code:
show_dhudmessage (id, "%s has been Banned.^nDuration : %s ^nBy Admin : %s ^nReason : %s", Name1, STR_Duration, Name2, ARG_Reason);
Already Done.. @sanjay singh

Instead of id you should take "0"

Keep learning !

Last edited by xExperienced; 07-26-2017 at 08:44.
xExperienced is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 07-26-2017 , 08:47   Re: Dhud in Ultimate Bans :D
Reply With Quote #4

Quote:
Originally Posted by xExperienced View Post
Code:
show_dhudmessage (id, "%s has been Banned.^nDuration : %s ^nBy Admin : %s ^nReason : %s", Name1, STR_Duration, Name2, ARG_Reason);
Already Done.. @sanjay singh

Instead of id you should take "0"

Keep learning !
but in your example you take id not 0 ?
__________________
Ayman Khaled is offline
xExperienced
Member
Join Date: Jun 2017
Location: USA
Old 07-26-2017 , 09:34   Re: Dhud in Ultimate Bans :D
Reply With Quote #5

Quote:
Originally Posted by Ayman Khaled View Post
but in your example you take id not 0 ?
Was just testing hud position that time... MY CODE WORKING FINE
xExperienced 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 18:51.


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