Put this server side. type ="server"
you need to do separate to show different huds.
function hud ( player , command )
outputChatBox("Hud toggled",player)
if getElementData(player,"hudshown") == 1 then
showPlayerHudComponent (player, "ammo", false )
showPlayerHudComponent (player, "weapon", false )
showPlayerHudComponent (player, "health", false )
showPlayerHudComponent (player, "clock", false )
showPlayerHudComponent (player, "money", false )
setElementData(player,"hudshown",0)
else
showPlayerHudComponent (player, "all", true )
setElementData(player,"hudshown",1)
end
end
addCommandHandler ( "hud", hud )