AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need 2 helps please: (https://forums.alliedmods.net/showthread.php?t=174628)

Isaac999 12-23-2011 04:06

Need 2 helps please:
 
1. I want to know how to check if the players is lower that 20(or any value).

2. How to set view model (knife model "p_" and "v_" models)

ConnorMcLeod 12-23-2011 04:34

Re: Need 2 helps please:
 
1. Register event Health with filter "1<20" or "1<=20"

2. Hook Ham_Weapon_Deploy as post, retrieve player index using get_pdata_cbase with ent index and m_pPlayer offset, retrieve weapon type using either cs_get_weapon_id or get_pdata_int with ent index and m_iId offset.
Set player pev_viewmodel2 (v_) and pev_weaponmodel2 (v_).
If you need all weapons, you have to register all weapons classes, if you only want knife for example, you can only register weapon_knife class and then you won't have to retrieve weapon type.
Don't forget to precache models.

Isaac999 12-23-2011 04:46

Re: Need 2 helps please:
 
I need help as tutorial please.

PHP Code:

 Your code please 



All times are GMT -4. The time now is 12:10.

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