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

Make circle with dhudmessages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SaBBa
Member
Join Date: Dec 2012
Old 02-05-2021 , 15:06   Make circle with dhudmessages
Reply With Quote #1

Help me to make something like a symmetrical circle
PHP Code:
switch(i%8) {
        case 
0:
            
set_dhudmessage(rgb, -1.0, -0.4020.14.00.020.02false)
        case 
1:
            
set_dhudmessage(rgb0.45, -0.4520.14.00.020.02false)
        case 
2:
            
set_dhudmessage(rgb0.40, -1.020.14.00.020.02false)
        case 
3:
            
set_dhudmessage(rgb0.450.4520.14.00.020.02false)
        case 
4:
            
set_dhudmessage(rgb, -1.00.4020.14.00.020.02false)
        case 
5:
            
set_dhudmessage(rgb, -0.450.4520.14.00.020.02false)
        case 
6:
            
set_dhudmessage(rgb, -0.40, -1.020.14.00.020.02false)
        case 
7:
            
set_dhudmessage(rgb, -0.45, -0.4520.14.00.020.02false)
    } 
P.S. how can I remove knife from a player ?
__________________

Last edited by SaBBa; 02-05-2021 at 15:27.
SaBBa is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-05-2021 , 18:04   Re: Make circle with dhudmessages
Reply With Quote #2

I doubt you will figure out how to make a circle if you don't know how to remove a knife.

https://www.amxmodx.org/api/fun/strip_user_weapons
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SaBBa
Member
Join Date: Dec 2012
Old 02-05-2021 , 18:15   Re: Make circle with dhudmessages
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
I doubt you will figure out how to make a circle if you don't know how to remove a knife.

https://www.amxmodx.org/api/fun/strip_user_weapons
Well, that's why I asked it, I might be complete noob, but I always manage to make whatever mod I want to, current one: https://www.youtube.com/watch?v=oxilxu8idh8

Alliedmods helped me a lot
__________________
SaBBa is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-05-2021 , 22:00   Re: Make circle with dhudmessages
Reply With Quote #4

So if you made the mod in the video, and there's a circle DHUD message in the video, why are you asking how to make it?
__________________

Last edited by OciXCrom; 02-05-2021 at 22:00.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SaBBa
Member
Join Date: Dec 2012
Old 02-05-2021 , 22:34   Re: Make circle with dhudmessages
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
So if you made the mod in the video, and there's a circle DHUD message in the video, why are you asking how to make it?
I just want to make it perfect, I have approximate coords, crosshair is not centered between x -0.4 and x 0.4
but if it's impossible to do so, it's fine

P.S. thanks for stripweapons
__________________
SaBBa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-05-2021 , 23:49   Re: Make circle with dhudmessages
Reply With Quote #6

Simply search for how to find the coordinates on a circle. Also, realize that a player's aspect ratio on their monitor/game will affect how it appears so it's unlikely that you will get it to be a perfect circle for everybody.
__________________
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-06-2021 , 03:20   Re: Make circle with dhudmessages
Reply With Quote #7

make a circle sprite, show it to the player this is the best option.

rather than using DHUDS messages which they're limited.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-06-2021 at 03:21.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
SaBBa
Member
Join Date: Dec 2012
Old 02-06-2021 , 06:45   Re: Make circle with dhudmessages
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
make a circle sprite, show it to the player this is the best option.

rather than using DHUDS messages which they're limited.
No idea how to make a sprite


made something more or less symmetrical


Here's the code if someone wants it

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <dhudmessage>
#include <hamsandwich>

new display_index[33]

public 
plugin_init() 

     
register_plugin("Bullet Damage","2.0","Nevermind23")  
     
RegisterHam(Ham_TakeDamage"player""TakeDamagePost"1)
}

public 
client_putinserver(id)
{
    
display_index[id] = 0
}

public 
TakeDamagePost(idinflictorattackerFloat:fDamage)
{
    if(!
is_user_connected(attacker) || attacker == id || cs_get_user_team(id) == cs_get_user_team(attacker) || fDamage <= || get_user_godmode(id))
        return 
PLUGIN_CONTINUE
    
new damage floatround(fDamage)
    new 
rgb
    r 
random(256)
    
random(256)
    
random(256)

    switch(
display_index[attacker]%8) {
        case 
0:
            
set_dhudmessage(rgb, -1.0, -0.3520.14.00.020.02false)
        case 
1:
            
set_dhudmessage(rgb0.43, -0.4020.14.00.020.02false)
        case 
2:
            
set_dhudmessage(rgb0.38, -1.020.14.00.020.02false)
        case 
3:
            
set_dhudmessage(rgb0.430.4020.14.00.020.02false)
        case 
4:
            
set_dhudmessage(rgb, -1.00.3520.14.00.020.02false)
        case 
5:
            
set_dhudmessage(rgb, -0.450.4020.14.00.020.02false)
        case 
6:
            
set_dhudmessage(rgb, -0.40, -1.020.14.00.020.02false)
        case 
7:
            
set_dhudmessage(rgb, -0.45, -0.4020.14.00.020.02false)
    }
    
    
display_index[attacker]++
    
show_dhudmessage(attacker,"%i"damage)    
    return 
PLUGIN_CONTINUE

__________________
SaBBa is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-06-2021 , 06:55   Re: Make circle with dhudmessages
Reply With Quote #9

That's pretty much the best you can do. You can't make it perfect, especially having in mind players can use different game resolutions/aspect ratios.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SaBBa
Member
Join Date: Dec 2012
Old 02-06-2021 , 13:33   Re: Make circle with dhudmessages
Reply With Quote #10

btw. I will ask it here, I am using https://forums.alliedmods.net/showthread.php?p=946089 this plugin, but when money is getting more than 99,999 it's getting 10,000, probably it has 5 digit limit, how can I change it ?

EDIT: Nevermind, changed cs_set_money_value to native cs_set_user_money and works like a charm
__________________

Last edited by SaBBa; 02-06-2021 at 13:51.
SaBBa 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 04:13.


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