AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud Message Time ? (https://forums.alliedmods.net/showthread.php?t=249329)

Awesome_man 10-04-2014 06:17

Hud Message Time ?
 
I want that the hud message will be placed on the screen for 4 sec after dat it dissapear, How to do it ? plz help

PHP Code:

#include <amxmodx>
#include <amxmisc>

new victimname[32]
new 
killername[32]
new 
g_Enable
new g_iSync

public plugin_init()
{
register_plugin("Grenade""1.0""")

g_Enable register_cvar("gk_enable""1"
g_iSync CreateHudSyncObj()

register_event("DeathMsg""playerDeath""a""1>0")
}

public 
playerDeath()
{
new 
killer read_data(1)
new 
victim read_data(2)
new 
weapon[8]
read_data(4weapon7)
get_user_name(killerkillername31)
get_user_name(victimvictimname31)
if (
get_pcvar_num(g_Enable) && killer != victim && equal(weapon"grenade"))
{
set_hudmessage(0255420.170.1326.012.0
ShowSyncHudMsg(0g_iSync"Message""Lol... xD %s Just Nade %s Hahah!!!"killernamevictimname
client_cmd(0"spk misc/witch")
}



zmd94 10-04-2014 06:42

Re: Hud Message Time ?
 
Just change this:
Code:

set_hudmessage(0, 255, 42, 0.17, 0.13, 2, 6.0, 12.0)
-->
Code:

set_hudmessage(0, 255, 42, 0.17, 0.13, 2, 4.0, 12.0)

Awesome_man 10-04-2014 06:48

Re: Hud Message Time ?
 
Quote:

Originally Posted by zmd94 (Post 2206891)
Just change this:
Code:

set_hudmessage(0, 255, 42, 0.17, 0.13, 2, 6.0, 12.0)
-->
Code:

set_hudmessage(0, 255, 42, 0.17, 0.13, 2, 4.0, 12.0)

is the 2nd last paremeter is for time ?

Still sometime hud message wont appear and sometime when 2 person nade or more it is not readable how to fix it ? how to show it in next line when more than 1 person nade ?

zmd94 10-04-2014 06:53

Re: Hud Message Time ?
 
I prefer to use client_print in this case or type the message in chat instead using hud message. ;)

Awesome_man 10-04-2014 07:09

Re: Hud Message Time ?
 
Quote:

Originally Posted by zmd94 (Post 2206897)
I prefer to use client_print in this case or type the message in chat instead using hud message. ;)

thnx for reply.. but this is not what m asking for :\

zmd94 10-04-2014 07:53

Re: Hud Message Time ?
 
Why you want this thread to be trashed? There still other people that can help you. ;)


All times are GMT -4. The time now is 17:36.

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