freeze.inc - Put it into the include folder in addons/amxmodx/scripting
freeze.sma - Compile it normally and put in plugins folder, guess I don't need to explain where it's.
FreezeTest - Same as freeze.sma
Tested and it works, only the view block wont block.
Step by step:
1. For check if the player is/ain't freezed.
- If he's freezed
PHP Code:
if(get_user_freeze(id))
- If he's not freezed
PHP Code:
if(!get_user_freeze(id))
2. For set/unset a completely freeze ( duck, weapon change, jump, shot and scope change )
- For set
PHP Code:
set_user_freeze(playerid, true, 2)
- For unset
PHP Code:
set_user_freeze(playerid, false)
3. For set/unset normal freeze ( only speed )
- For set
PHP Code:
set_user_freeze(playerid, true, 1)
- For unset
PHP Code:
set_user_freeze(playerid, false)