AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] HEADSHOT CLASS (https://forums.alliedmods.net/showthread.php?t=96006)

malec321 06-29-2009 17:33

[HELP] HEADSHOT CLASS
 
Can any1 tell me how to make this guy so u can only headshot him?
}
case 10:// Hitbox Class
{
StripUserWeapons(id)
cs_set_user_defuse(id, 1)

give_item (id, "weapon_knife")

set_user_hitzones( ???

client_print(id, print_chat, "%s You have chosen the Hitbox Class(HEAD HITS ONLY)", PREFIX)
}

anakin_cstrike 06-29-2009 17:44

Re: [HELP] HEADSHOT CLASS
 
Param @ set_user_hitszone must be 2

malec321 06-29-2009 19:17

Re: [HELP] HEADSHOT CLASS
 
set_user_hitzone (id, 2) ?

Exolent[jNr] 06-29-2009 19:35

Re: [HELP] HEADSHOT CLASS
 
No, he said there must be 2 parameters, which after making my post below, is wrong.

anakin_cstrike 06-29-2009 19:49

Re: [HELP] HEADSHOT CLASS
 
Quote:

Originally Posted by Exolent[jNr] (Post 860372)
No, he said there must be 2 parameters.

I meant what malec321 posted.

Exolent[jNr] 06-29-2009 21:49

Re: [HELP] HEADSHOT CLASS
 
Then you are wrong.

http://www.amxmodx.org/funcwiki.php?...ones&go=search

Quote:

set_user_hitzones ( index = 0, target = 0, body = 255 )

...

Sets hit zones for player.
Parts of body are as bits:
1 - generic
2 - head
4 - chest
8 - stomach
16 - left arm
32 - right arm
64 - left leg
128 - right leg

...

Set index to 0 and target to a player's index to define what bodyparts on player other players can hit when they are firing.
set_user_hitzones(0, id, 2);

anakin_cstrike 06-30-2009 11:24

Re: [HELP] HEADSHOT CLASS
 
I've forgot about that, damn...and the funny thing is that i used that function a couple of weeks ago


All times are GMT -4. The time now is 15:35.

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