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

quick help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Usama Ali
Member
Join Date: Apr 2020
Old 04-21-2022 , 15:34   quick help
Reply With Quote #1

the following code is about freezing the first zombie, but its for zp 5.0 so can anyone edit this and make it work for zp 4.3
Code:
#include <amxmodx>
#include <fun>
#include <zp50_core>

#define PLUGIN     "[ZP50] Freeze first zombie"
#define VERSION             "1.0"
#define AUTHOR             "wicho"

#define MarkPlayerSpeed(%0)  bitPlayerSpeed |= (1 << (%0 & 31))
#define ClearPlayerSpeed(%0) bitPlayerSpeed &= ~(1 << (%0 & 31))
#define IsPlayerSpeed(%0)    bitPlayerSpeed & (1 << (%0 & 31))

new bitPlayerSpeed

new cvar_time

public plugin_init() 
{ 
    register_plugin(PLUGIN, VERSION, AUTHOR) 
        
    cvar_time = register_cvar("zp_freeze_frist_zombie", "5.0")
} 

public zp_fw_core_infect_post(id) 
{     
      if(is_user_alive(id) && zp_core_is_first_zombie(id))
      {
         IsPlayerSpeed(id) = get_user_maxspeed(id)
         set_user_maxspeed(id, 1.0)
         set_task(cvar_time, "Unfreeze", id)   
      }    
}      

public Unfreeze(id) 
{
   set_user_maxspeed(id, IsPlayerSpeed(id))
}
Usama Ali is offline
 



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 07:25.


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