Raised This Month: $ Target: $400
 0% 

Peace Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-29-2006 , 19:00  
Reply With Quote #21

I've done this before, trust me. It'll not work.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 05-31-2006 , 13:19  
Reply With Quote #22

It doesnt look like that prevents any weapon usage... and if you think you'll shoot through people, give the peace ppl semiclip instead...
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-31-2006 , 15:25  
Reply With Quote #23

You all fail at life.

Thorstur, try this:

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> new bool:g_bPeace[33] public plugin_init() {     register_plugin("Peace","1.0","Hawk552")         register_clcmd("say /peace","fnCmdPeace")     register_clcmd("say_team /peace","fnCmdPeace")         register_cvar("amx_peace_noguns","1")     register_cvar("amx_peace_semiclip","1") } public fnCmdPeace(id) {     if(g_bPeace[id])         client_print(id,print_chat,"[AMXX] Peace mode disabled, say /peace to enable again.")     else         client_print(id,print_chat,"[AMXX] Peace mode enabled, say /peace to disable it.")         g_bPeace[id] = !g_bPeace[id] } public client_PreThink(id) {     if(!is_user_alive(id) || !g_bPeace[id])         return PLUGIN_CONTINUE         if(get_cvar_num("amx_peace_noguns"))     {         new iClip, iAmmo, iWeap = get_user_weapon(id,iClip,iAmmo)                     if(iWeap != CSW_KNIFE && iWeap != CSW_C4)         {             strip_user_weapons(id)             give_item(id,"weapon_knife")         }     }         if(get_cvar_num("amx_peace_semiclip"))     {         new iEnts[1], bool:bEntFlag, Float:flRadius = 200.0                 find_sphere_class(id,"trigger_hurt",flRadius,iEnts,1)         if(iEnts[0])             bEntFlag = true                     find_sphere_class(id,"trigger_teleport",flRadius,iEnts,1)         if(iEnts[0])             bEntFlag = true                 if(bEntFlag)             entity_set_int(id,EV_INT_solid,3)         else             entity_set_int(id,EV_INT_solid,0)     }         return PLUGIN_CONTINUE }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 19:46.


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