Raised This Month: $51 Target: $400
 12% 

Freeze Code.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lolzin123
Member
Join Date: Apr 2009
Old 08-04-2009 , 17:44   Freeze Code.
Reply With Quote #1

How to freeze the player per 10 seconds...

OBS: if use set_user_maxspeed when the player stwich the weapon your maxspeed set to default.
lolzin123 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2009 , 17:47   Re: Freeze Code.
Reply With Quote #2

You can use : set_pev( id, pev_flags, pev( id, pev_flags ) | FL_FROZEN ); + set_task() to remove by doing : set_pev( id, pev_flags, pev( id, pev_flags ) & ~FL_FROZEN );
__________________
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-04-2009 , 17:52   Re: Freeze Code.
Reply With Quote #3

Code:
new g_IsFrozen[33];   public plugin_init()         register_event("CurWeapon", "CurWeapon", "be", "1=1");   public CurWeapon(Cl) {         static LastWeap[33];           if (g_IsFrozen[Cl] && LastWeap[Cl] != (LastWeap[Cl] = read_data(2)))                 set_user_maxspeed(Cl, 1.0); }   public Freeze(Cl) {         g_IsFrozen[Cl] = true;           set_task(10.0, "SetUnfrozen", Cl); }   public SetUnfrozen(Cl) {         g_IsFrozen[Cl] = false;           set_user_maxspeed(Cl, 250.0); // Could use a better way }
EDIT: Or use Arkshine's way instead of set_user_maxspeed().
__________________
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-04-2009 , 17:53   Re: Freeze Code.
Reply With Quote #4

Quote:
Originally Posted by hleV View Post
EDIT: Or use Arkshine's way instead of set_user_maxspeed().
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lolzin123
Member
Join Date: Apr 2009
Old 08-05-2009 , 08:25   Re: Freeze Code.
Reply With Quote #5

Thanx man!
lolzin123 is offline
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 01:48.


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