| 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 iFF, iHandler
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
iFF = get_cvar_pointer( "mp_friendlyfire" )
iHandler = get_pcvar_num( iFF )
register_clcmd( "say /box", "cmdBox" )
}
public cmdBox( id ) {
if( !is_user_connected( id ) || !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT ) {
return PLUGIN_HANDLED
}
switch( iHandler ) {
case 0: {
server_cmd( "mp_friendlyfire 1" )
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "PorTal Jailbreak Box Is on!")
}
case 1: {
server_cmd( "mp_friendlyfire 0" )
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.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!
|