AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to remove hudmsg (https://forums.alliedmods.net/showthread.php?t=74471)

hzqst 07-19-2008 13:04

how to remove hudmsg
 
Quote:

public funcShowHud(id){
ClearSyncHud(id)
set_hudmessage(200, 250, 0, 0.7, 0.8, 0, 6.0, 99.0, 0.0, 0.0, -1)
if(get_user_team(id) == 2 && is_user_alive(id))
switch(gzombie[id]){
case 1:ShowSyncHudMsg(id, CreateHudSyncObj(), "[%L]^n%L : %d",id,"HUD_CLASS_SPEED","HUD_HEALTH", get_user_health(id))
case 2:ShowSyncHudMsg(id, CreateHudSyncObj(), "[%L]^n%L : %d",id,"HUD_CLASS_GRAVITY","HUD_HEALTH", get_user_health(id))
case 3:ShowSyncHudMsg(id, CreateHudSyncObj(), "[%L]^n%L : %d",id,"HUD_CLASS_NORMAL","HUD_HEALTH", get_user_health(id))
case 4:ShowSyncHudMsg(id, CreateHudSyncObj(), "[%L]^n%L : %d",id,"HUD_CLASS_JUMP","HUD_HEALTH", get_user_health(id))
case 5:ShowSyncHudMsg(id, CreateHudSyncObj(), "[%L]^n%L : %d",id,"HUD_CLASS_VIS","HUD_HEALTH", get_user_health(id))
}
if(get_user_team(id) == 1 && is_user_alive(id)){
new clip,ammo
new wep = get_user_weapon(id,clip,ammo)
if(wep != 4 && wep != 6 && wep != 9 && wep != 25 && wep != 29)
ShowSyncHudMsg(id, CreateHudSyncObj(), "%L[%d / %d]",id,"HUD_AMMO", clip, cs_get_user_bpammo(id,wep))
if(wep == 29)
ShowSyncHudMsg(id, CreateHudSyncObj(), "%L",id,"HUD_AMMO_KNIFE")
if(wep == 25 || wep == 9 || wep == 6 )
ShowSyncHudMsg(id, CreateHudSyncObj(), "%L",id,"HUD_AMMO_UNKNOW")
if(wep == 4)
ShowSyncHudMsg(id, CreateHudSyncObj(), "%L",id,"HUD_AMMO_HE")
}
return PLUGIN_CONTINUE
}
this function runs when a player takes damage or shoots
Quote:

dictionary:
[en]
HUD_HEALTH = hp :
HUD_AMMO = clip/ammo :
HUD_CLASS_SPEED = fast zombie
HUD_CLASS_GRAVITY = .......
..........
ClearSyncHud doesn't work but no errors

AntiBots 07-19-2008 13:53

Re: how to remove hudmsg
 
PHP Code:

new hudsync

public plugin_init() 
{
-----------------------------------
-----------------------------------
}
 
public 
hudmsg(id)
 
ClearSyncHud(idhudsync)
 
Set_hudmessage255255255, -10.500,...........
ShowSyncHudMsg(idhudsync"your MsG"

You use some like this?

hzqst 07-19-2008 21:54

error
 
Quote:

new ghudsync

public funcShowHud(id){
ClearSyncHud(id, ghudsync)
set_hudmessage(200, 250, 0, 0.02, 0.9, 0, 6.0, 120.0, 0.0, 0.0, -1)
if(get_user_team(id) == 2 && is_user_alive(id))
switch(gzombie[id]){
case 1:ShowSyncHudMsg(id, ghudsync, "[%L]^n%L : %d",id,"HUD_CLASS_SPEED","HUD_HEALTH", get_user_health(id))
case 2:ShowSyncHudMsg(id, ghudsync, "[%L]^n%L : %d",id,"HUD_CLASS_GRAVITY","HUD_HEALTH", get_user_health(id))
case 3:ShowSyncHudMsg(id, ghudsync, "[%L]^n%L : %d",id,"HUD_CLASS_NORMAL","HUD_HEALTH", get_user_health(id))
case 4:ShowSyncHudMsg(id, ghudsync, "[%L]^n%L : %d",id,"HUD_CLASS_JUMP","HUD_HEALTH", get_user_health(id))
case 5:ShowSyncHudMsg(id, ghudsync, "[%L]^n%L : %d",id,"HUD_CLASS_VIS","HUD_HEALTH", get_user_health(id))
}
if(get_user_team(id) == 1 && is_user_alive(id)){
new clip,ammo
new wep = get_user_weapon(id,clip,ammo)
if(wep != 4 && wep != 6 && wep != 9 && wep != 25 && wep != 29)
ShowSyncHudMsg(id, ghudsync, "%L[%d / %d]",id,"HUD_AMMO", clip, cs_get_user_bpammo(id,wep))
if(wep == 29)
ShowSyncHudMsg(id, ghudsync, "%L",id,"HUD_AMMO_KNIFE")
if(wep == 25 || wep == 9 || wep == 6 )
ShowSyncHudMsg(id, ghudsync, "%L",id,"HUD_AMMO_UNKNOW")
if(wep == 4)
ShowSyncHudMsg(id, ghudsync, "%L",id,"HUD_AMMO_HE")
}
return PLUGIN_CONTINUE
}
L 07/20/2008 - 09:46:58: HudSyncObject -1 is invalid
L 07/20/2008 - 09:46:58: [AMXX] Run time error 10 (plugin "amx_chickenrun.amxx") (native "ClearSyncHud") - debug not enabled!
L 07/20/2008 - 09:46:58: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

AntiBots 07-19-2008 22:18

Re: how to remove hudmsg
 
In public plugin_init put:
PHP Code:

 hudsync CreateHudSyncObj() 



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

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