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

text style to hud ?


Post New Thread Reply   
 
Thread Tools Display Modes
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-14-2017 , 15:06   Re: text style to hud ?
Reply With Quote #11

yes i know if you learn how to use hud but i didn't deal with hud before so can you do it please ?

can this work :
PHP Code:
set_hudmessage(025500.290.8206.012.0)
show_hudmessage(id"^4[%s]^1 You got^3 %i^1 points | Level:^3 %i ^1[^3%s^1]"
and how do i set it permanent ?

Last edited by yas17sin; 02-14-2017 at 15:30.
yas17sin is offline
Send a message via ICQ to yas17sin
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-14-2017 , 16:16   Re: text style to hud ?
Reply With Quote #12

You screw it up, %s is checking the variable. If theres no variables to check, it wont work.
Code:
new g_TAG = "Server" // xxx client_print(X, 3, /* print_chat */ "[%s] This is a message.", g_TAG);
So the '%s' is checking for the first variable loded, it can be number, letter & symbols.
You can check more, just adding %s/%d/%i.
__________________

Last edited by Relaxing; 02-14-2017 at 16:16.
Relaxing is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-14-2017 , 16:23   Re: text style to hud ?
Reply With Quote #13

no no i know i already have a variable TAG "level-system"
yas17sin is offline
Send a message via ICQ to yas17sin
Old 02-14-2017, 16:24
yas17sin
This message has been deleted by yas17sin. Reason: nvm
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-14-2017 , 16:24   Re: text style to hud ?
Reply With Quote #14

Check API for HUD Messages.
__________________
Relaxing is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-14-2017 , 16:25   Re: text style to hud ?
Reply With Quote #15

link please ?
yas17sin is offline
Send a message via ICQ to yas17sin
Old 02-14-2017, 16:38
yas17sin
This message has been deleted by yas17sin. Reason: Solved
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-14-2017 , 17:04   Re: text style to hud ?
Reply With Quote #16

so i did it and now it's working i can see level and xp and level name but it can't get update.
Example : if i killed someone i can't see the current xp that i get for killing him it's not get update when anything happen and when i die the hud disppear and doesn't show up anyway to make it automatic hud and doesn't disppear when i die or i level up ?

code :
PHP Code:
public CmdShowHud(id

    if(
is_user_connected(id) && g_iXp[id]<=)
    {
    
set_hudmessage(025500.290.7906.0500.0)
    
ShowSyncHudMsg(idg_msgsync"%L"id"YOURLEVEL_CHATCOMMAND_MAXLEVEL"TAGg_iXpid ], g_iLevel[id], g_szLevelNames[g_iLevel[id]]); 
    }


Last edited by yas17sin; 02-14-2017 at 17:05.
yas17sin is offline
Send a message via ICQ to yas17sin
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-14-2017 , 17:22   Re: text style to hud ?
Reply With Quote #17

It's called time update, it reloads the HUD X seconds you want. (suggested 1sec)
__________________
Relaxing is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-14-2017 , 17:37   Re: text style to hud ?
Reply With Quote #18

where is it ? and what about when i die the hud disppear.
yas17sin is offline
Send a message via ICQ to yas17sin
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-15-2017 , 04:12   Re: text style to hud ?
Reply With Quote #19

Code:
#include <engine> /* plugin_init */ new iEnt = create_entity("entityX") entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 1.0) public function_X(iEnt) {     entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 1.0) }
__________________

Last edited by Relaxing; 02-15-2017 at 12:10.
Relaxing is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-15-2017 , 04:27   Re: text style to hud ?
Reply With Quote #20

Or you can set the task when player has joined.

PHP Code:
public client_putinserver(id)
{
    
set_task(1.0"showLevel"id, .flags "b")

PHP Code:
public showLevel(id)
{
    if(
is_user_conneted(id) && g_iXp[id] > 0)
    {
         
set_hudmessage(025500.290.7906.01.0)
         
ShowSyncHudMsg(idg_msgsync"%L"id"YOURLEVEL_CHATCOMMAND_MAXLEVEL"TAGg_iXpid ], g_iLevel[id], g_szLevelNames[g_iLevel[id]]); 
    }

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

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

Last edited by EFFx; 02-15-2017 at 04:28.
EFFx 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:30.


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