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 , 02:50   Re: I wanna some plugin for my knife server
Reply With Quote #4

Quote:
Originally Posted by thEsp View Post
Code:
#include <amxmodx> #include <fakemeta> #define FREEZE_RADIUS 0 #define FREEZE_TIME 5.0 #define ACCESS_FLAG ADMIN_BAN #define VALID_PLAYER<%1> (0 < %1 && %1 < 33) 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 = -1, Float:fPlayerPosition[3];     pev(iPlayer, pev_origin, fPlayerPosition);         while ((iTargetPlayer = engfunc(EngFunc_FindEntityInSphere, iTargetPlayer, fPlayerPosition, FREEZE_RADIUS)) != 0)     {         if (VALID_PLAYER<iTargetPlayer> && is_user_alive(iTargetPlayer) /* Not sure if necessary. */)         {             set_pev(iPlayer, pev_flags, pev(iPlayer, pev_flags) | FL_FROZEN);             set_task(FREEZE_TIME, "OnTsk_ThawPlayer", iTargetPlayer);         }     }         return PLUGIN_HANDLED; } public OnTsk_ThawPlayer(iPlayer) {     set_pev(iPlayer, pev_flags, pev(iPlayer, pev_flags) & ~FL_FROZEN); }

This might do the job, I think.
it is great but it is only one problem that it freezes the admin him self not the players around him
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