View Single Post
Gabrielx
Junior Member
Join Date: Jul 2015
Old 11-07-2022 , 08:09   Re: [Request] Freeze Player For 1 Second When Spawned
Reply With Quote #7

Try this:
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>


#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
}

public 
fwHamPlayerSpawnPost(id)
{
        
entity_set_int(idEV_INT_flagsentity_get_int(idEV_INT_flags) | FL_FROZEN);
        
set_task(1.0"unfreeze"id);
}

public 
unfreeze(id)
    
entity_set_int(idEV_INT_flagsentity_get_int(idEV_INT_flags) & ~FL_FROZEN); 
Gabrielx is offline