Raised This Month: $ Target: $400
 0% 

Solved [Request] Freeze Player For 1 Second When Spawned


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 11-06-2022 , 15:47   Re: [Request] Freeze Player For 1 Second When Spawned
Reply With Quote #1

try adding this to your code -> https://forums.alliedmods.net/showth...98#post2510998
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
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 #2

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
Snake.
Senior Member
Join Date: Jul 2017
Old 11-07-2022 , 10:33   Re: [Request] Freeze Player For 1 Second When Spawned
Reply With Quote #3

Thank you both

Quote:
Originally Posted by Gabrielx View Post
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); 
Quote:
Originally Posted by Nutu_ View Post
Snake. is offline
Send a message via Skype™ to Snake.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:57.


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