AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove all hitzones except the legs (https://forums.alliedmods.net/showthread.php?t=76616)

Sam Tsuki 08-27-2008 12:21

Remove all hitzones except the legs
 
I tried many ways to do this but nothing worked
It removes all the hit zones except one leg
Then I used this way:
PHP Code:

public check_hitzones1(id)
{
     
set_user_hitzones(0id64)
     
set_task(0.1"check_hitzones2"id)
}
public 
check_hitzones2(id)
{
     
set_user_hitzones(0id128)
     
set_task(0.1"check_hitzones1"id)


This will make the hitzones switch between left and right leg every 0.1 sec
But I think there's a more efficiant way to do this
If anyone knows a way to make the two hitzones work together plz tell me

Emp` 08-27-2008 12:24

Re: Remove all hitzones except the legs
 
set_user_hitzones(0, id, 192);

Sam Tsuki 08-27-2008 12:39

Re: Remove all hitzones except the legs
 
Quote:

Originally Posted by Emp` (Post 676699)
set_user_hitzones(0, id, 192);

Thanx a lot Emp`!
I didn't try it yet but I don't doubt it will work :D
So you just do like "64 + 128" for left and right legs and "2 + 4" for head and chest and so on???

Orangutanz 08-27-2008 19:29

Re: Remove all hitzones except the legs
 
Hi Sam Tsuki,

I would advise not to use Fun module: set_user_hitzones
It would be best if you used FakeMeta and hook TraceLine at post stage, search the forums how to do this.

The reason it's not advisable for using Fun is due to the way MetaMod works, it fails to copy the altered pointer data to proceeding modules/plugins. So if you had a plugin which is using set_user_hitzones and another plugin which is loaded afterwards using FakeMeta (TraceLine) for example your plugin will fail to alter the hitzones correctly.


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

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