Raised This Month: $ Target: $400
 0% 

I wanna some plugin for my knife server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 01-11-2021 , 08:24   Re: I wanna some plugin for my knife server
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define FREEZE_RADIUS 300.0
#define FREEZE_TIME 5.0
#define ACCESS_FLAG ADMIN_BAN

public plugin_init()
{
    
register_clcmd("say /freeze""OnCmd_SaySlashFreeze");
}

public 
OnCmd_SaySlashFreeze(iPlayer)
{
    if (!(
get_user_flags(iPlayer) & ACCESS_FLAG))
        return 
PLUGIN_CONTINUE;

    new 
iTargetPlayer = -1iPlayerTeam get_user_team(iPlayer), Float:fPlayerPosition[3], iFrozeni_aFrozen[32];
    
pev(iPlayerpev_originfPlayerPosition);
    
    while ((
iTargetPlayer engfunc(EngFunc_FindEntityInSphereiTargetPlayerfPlayerPositionFREEZE_RADIUS)) != 0)
    {
        if (
is_user_alive(iTargetPlayer)  && iPlayerTeam  != get_user_team(iTargetPlayer))
        {
            
set_pev(iPlayerpev_flagspev(iPlayerpev_flags) | FL_FROZEN);
            
i_aFrozen[iFrozen ++] = iTargetPlayer;
        }
    }
    
    if(
iFrozen  0set_task(FREEZE_TIME"OnTsk_ThawPlayer"iFrozeni_aFrozenstrlen(i_aFrozen));
    return 
PLUGIN_HANDLED;
}

public 
OnTsk_ThawPlayer(i_aPlayers[], iFrozen)
{
    for(new 
iiPlayeriFrozeni++)
    {
         
iPlayer i_aPlayers];
         if(!
is_user_alive(iPlayer)) continue;
         
set_pev(iPlayerpev_flagspev(iPlayerpev_flags) & ~FL_FROZEN);
    }




you need to set a value for the freeze radius.
well it does freezes me instead of my enemies
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
 



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:46.


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