AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hitboxes and hudmesage's (https://forums.alliedmods.net/showthread.php?t=22760)

h4x0rZ- 01-03-2006 11:20

Hitboxes and hudmesage's
 
Hmm... Im thinking about making my own Sound Plugin, because i have some specific thing which i want to chose.
Quote:

Originally Posted by List of help I need
1) How do I get info about how much headshots have player got in streak.
2) Is there available to change for one hudmessage its size and font.
3) Can I get BLACK hudmessage without transparency.
4) How I can get range of what player has been killed.

Sorry for posting all in one... But I don't want to make forum full of my problems. Im new to scripting so first things I will post in one topic... Later when I will have bigger needs I will post every problem in other topic.

Hawk552 01-03-2006 13:50

1.

Code:
#include <amxmodx> new headshots[33]; public plugin_init() {     register_plugin("whatever","whatever","whoever");         register_event("DeathMsg","Check_Death","a"); } public Check_Death() {     new attacker = read_data(1),victim = read_data(2), headshot = read_data(3);         if(attacker && headshot)     {         headshots[attacker]++;     }     else if(attacker && !headshot)     {         headshots[attacker] = 0;     }         headshots[victim] = 0;         client_print(attacker,print_chat,"You have %i headshots or something",headshots[attacker]);         return 0; }

2. No

3. No

4.
Code:
#include <amxmodx> new headshots[33]; public plugin_init() {     register_plugin("whatever","whatever","whoever");         register_event("DeathMsg","Check_Death","a"); } public Check_Death() {     new attacker = read_data(1),victim = read_data(2), headshot = read_data(3);         if(attacker && headshot)     {         headshots[attacker]++;     }     else if(attacker && !headshot)     {         headshots[attacker] = 0;     }         new aorigin[3],vorigin[3];     get_user_origin(attacker,aorigin,1);     get_user_origin(victim,vorigin,1);         new dist = get_distance(aorigin,vorigin);         headshots[victim] = 0;         client_print(attacker,print_chat,"You have %i headshots or something. You killed the victim from %i units away.",headshots[attacker],dist);         return 0; }

Charr 01-03-2006 15:49

I believe that HL units = inches
(Normal player height = 72, 72 inches = 6 feet)

v3x 01-03-2006 15:53

Also, you might want to set headshots[id] to 0 upon disconnect/connect.

Hawk552 01-03-2006 19:03

Yeah whatever, wasn't planning on him using it, just an example.

h4x0rZ- 01-03-2006 22:41

ok thank you all... Heh... im really new to scripting how i mentioned at 1st post so i dunno how to make those disconnect thing but i will look in other plugins and thanks again :)
EDIT: But can i get Black Tranparent hudmessage?

Hawk552 01-03-2006 22:58

Quote:

Originally Posted by Hawk552
2. No

3. No

Code:
public client_disconnect(id) {     headshots[id] = 0; }

or just this, although I hate when people do it:

Code:
public client_disconnect(id)     headshots[id] = 0;

h4x0rZ- 01-04-2006 14:00

hmm... Now i got something in my script... really big thank to Dizzy for releasing his Ultimate Sound plugin... I got some help of him... so thank you Dizzy... But... now i made that there is counting of headshots e.t.c but how can i make that it is playing sound and showing HeadHunter text only if player got 2 HS in streak and 4 ?
heres my script:
Code:
public hs(){    new hsmode[4]    get_cvar_string("hs_mode",hsmode,4)    new hsmode_bit = read_flags(hsmode)    if (hsmode_bit & 1) {     new killer_id = read_data(1)     new victim_id = read_data(2)     new killer_name[33], victim_name[33]     get_user_name(killer_id,killer_name,33)     get_user_name(victim_id,victim_name,33)     set_hudmessage(0, 0, 0, -1.0, 0.05, 0, 6.0, 6.0, 0.5, 0.15, 1)     show_hudmessage(0,hsmessages[ random_num(0,HSMESSAGES-1) ],killer_name,victim_name)    }    if (hsmode_bit & 2) {     client_cmd(0,"spk misc/headshot")    }    return PLUGIN_CONTINUE } public headhunter(){     new hhmode[4]     get_cvar_string("hh_mode",hhmode,4)     new hhmode_bit = read_flags(hhmode)         if (hhmode_bit & 1) {         new killer_id = read_data(1)         new victim_id = read_data(2)         new headshot = read_data(3)         new killer_name[33], victim_name[33]         if(attacker && headshot) {         headshots[attacker]++;     }     else if(attacker && !headshot) {         headshots[attacker] = 0;     }         headshots[victim] = 0;         get_user_name(killer_id,killer_name,33)         set_hudmessage(0, 0, 0, -1.0, 0.05, 0, 6.0, 6.0, 0.5, 0.15, 1)     show_hudmessage(0,headhuntermsg[ random_num(0,HEADHUNTER-1) ],killer_name,headshot,victim_name)    }    if (hhmode_bit & 2) {     client_cmd(0,"spk misc/headhunter")    } }

Hawk552 01-04-2006 20:55

Code:
if(headshots[id] != 2) {      return; }

h4x0rZ- 01-05-2006 00:08

Hmmm... i tried to insert it in script but dunno where and how to do that o_0
Code:
public headhunter(){     new hhmode[4]     get_cvar_string("hh_mode",hhmode,4)     new hhmode_bit = read_flags(hhmode)         if (hhmode_bit & 1) {         new killer_id = read_data(1)         new victim_id = read_data(2)         new headshot = read_data(3)         new killer_name[33], victim_name[33]         if(attacker && headshot) {         headshots[attacker]++;     }     else if(attacker && !headshot) {         headshots[attacker] = 0;     }         headshots[victim] = 0;         get_user_name(killer_id,killer_name,33)         set_hudmessage(0, 0, 0, -1.0, 0.05, 0, 6.0, 6.0, 0.5, 0.15, 1)     show_hudmessage(0,headhuntermsg[ random_num(0,HEADHUNTER-1) ],killer_name,headshot,victim_name)    }    if (hhmode_bit & 2) {     client_cmd(0,"spk misc/headhunter")    } }
Maybe someone of you all could insert this ? ... I need for kills 2, 4, 6.
And that could be all for now...


All times are GMT -4. The time now is 16:06.

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