AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Box (https://forums.alliedmods.net/showthread.php?t=159004)

Diegorkable 06-11-2011 16:52

Box
 
Hey, I scripted a code that when you type in JailBreak server /box it turns FF(Friendly Fire) ON. I want to add one more thing to the script but dont know how to, so if could anyone edit my script and post it here the way it should be done.

I want that once the CT types /box, the friendlyfire will apply only TO THE TERROR, and NOT TO THE CT. means, Terror can kill each other, CT can NOT kill each other, Terrors CAN kill CT and CT CAN kill Terror.

If anyone could do that it'd be really appreciate since its quite urgent for me!

Here is the code:

PHP Code:

#include <amxmodx> 
#include <cstrike> 

#define PLUGIN "JB Box" 
#define VERSION "0.1" 
#define AUTHOR "Name" 

new iFFiHandler 

public plugin_init() { 
register_plugin(PLUGINVERSIONAUTHOR
iFF get_cvar_pointer"mp_friendlyfire" 

iHandler get_pcvar_numiFF 

register_clcmd"say /box""cmdBox" 


public 
cmdBoxid ) { 
if( !
is_user_connectedid ) || !is_user_aliveid ) || cs_get_user_teamid ) != CS_TEAM_CT ) { 
return 
PLUGIN_HANDLED 


switch( 
iHandler ) { 
case 
0: { 
server_cmd"mp_friendlyfire 1" 
set_hudmessage(02550, -1.0, -1.006.012.0
show_hudmessage(id"PorTal Jailbreak Box Is on!"

case 
1: { 
server_cmd"mp_friendlyfire 0" 
set_hudmessage(25500, -1.0, -1.006.012.0
show_hudmessage(id"PorTal Jailbreak Box Is off!"



iHandler = !iHandler 

return PLUGIN_HANDLED 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1255\\ deff0\\ deflang1037{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ f0\\ fs16 \n\\ par }
*/ 

Thanks to all the helpers!


All times are GMT -4. The time now is 23:23.

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