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

How to make HUD permanent?


Post New Thread Reply   
 
Thread Tools Display Modes
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-15-2012 , 07:34   Re: How to make HUD permanent?
Reply With Quote #11

okay thanks in advance
Randomize is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-15-2012 , 09:13   Re: How to make HUD permanent?
Reply With Quote #12

The code doesn't work
Randomize is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-15-2012 , 10:10   Re: How to make HUD permanent?
Reply With Quote #13

Just check if the user is holding a sniper weapon with get_user_weapon(id).
__________________
<VeCo> is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-16-2012 , 03:47   Re: How to make HUD permanent?
Reply With Quote #14

Quote:
if(get_user_weapon(id, CSW_AWP))

new i
for(i = 0; i < 4; i++)
ClearSyncHud(id, SyncObj[i])
remove_task(TASKID)

else if(!get_user_weapon(id, CSW_AWP))
set_task(UPDATE , "ShowCH", TASKID, _, _, "b")
Randomize is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-16-2012 , 07:42   Re: How to make HUD permanent?
Reply With Quote #15

try this.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(1.0"CheckWeapon"___"b")
}

public 
CheckWeapon(id)
{
    if (
get_user_weapon(id) == CSW_AWP)
    {
        
set_hudmessage(02550, -1.0, -1.000.11.0)
        
show_hudmessage(id".")
    }

__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 05-16-2012 at 07:42.
Bilal Pro is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-16-2012 , 10:25   Re: How to make HUD permanent?
Reply With Quote #16

Quote:
Originally Posted by Bilal Pro View Post
try this.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(1.0"CheckWeapon"___"b")
}

public 
CheckWeapon(id)
{
    if (
get_user_weapon(id) == CSW_AWP)
    {
        
set_hudmessage(02550, -1.0, -1.000.11.0)
        
show_hudmessage(id".")
    }

It will show the hud when draw the awp?
Randomize is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-16-2012 , 11:05   Re: How to make HUD permanent?
Reply With Quote #17

Still not working
Randomize is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-16-2012 , 11:07   Re: How to make HUD permanent?
Reply With Quote #18

No, his code won't work. The task doesn't have an id.
You should loop trough all players and make the check for the weapon there:

PHP Code:
#define SNIPER_WEAPONS (1 << CSW_AWP | 1 << CSW_SCOUT | 1 << CSW_G3SG1 | 1 << CSW_SG550) // sniper weapons go here... 
PHP Code:
 static players[32],numi,id
 get_players
(players,num,"a")
 
 for(
i=0;i<num;i++)
 {
  
id players[i]
 
  if(
<< get_user_weapon(id) & SNIPER_WEAPONS) continue // weapon is a sniper - continue with the next player...
 
  
set_hudmessage(25500, -1.0, -1.0,  .holdtime 1.0)
  
ShowSyncHudMsg(id,sync"o")
 } 
And, btw, it's better to use a thinking entity.
__________________

Last edited by <VeCo>; 05-16-2012 at 11:08.
<VeCo> is offline
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 05-16-2012 , 11:13   Re: How to make HUD permanent?
Reply With Quote #19

register think?
Randomize is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-16-2012 , 11:18   Re: How to make HUD permanent?
Reply With Quote #20

Yes, but it isn't really a big problem, it will work good with a task.
__________________

Last edited by <VeCo>; 05-16-2012 at 11:18.
<VeCo> 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 19:04.


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