Raised This Month: $ Target: $400
 0% 

activation only 6 tr pls ^^


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
klysman07
Senior Member
Join Date: Oct 2011
Old 06-23-2012 , 10:11   activation only 6 tr pls ^^
Reply With Quote #1

I want this plugin can only be active when there are six or fewer TR

PLSS

Quote:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "JailBreak BOX"
#define VERSION "0.1"
#define AUTHOR "Greenmaw"

new iFF, iHandler
new iCash[33]

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_event("DeathMsg", "Event_DeathMsg", "a")

iFF = get_cvar_pointer("mp_friendlyfire")
iHandler = get_pcvar_num(iFF)

register_clcmd("say /box", "cmd_Box")

RegisterHam(Ham_TraceAttack , "player" , "FwdTraceAttack")
}

public cmd_Box(id) {
// If the user not connected or not alive
if(!is_user_connected(id) || !is_user_alive(id)) {
// End The Code
return PLUGIN_HANDLED
}
new szName[33]
get_user_name(id, szName, 32)

// if the user not are CT
if(cs_get_user_team(id) != CS_TEAM_CT) {
// Write That Only CT Can Use That Command
set_hudmessage(0, 0, 200,-1.0, -1.0 ,0, 6.0, 12.0)
client_print(id, print_chat, "Voce nao tem acesso a esse comando idiota !!!", szName)

// End The Code
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, "Box Ativado !!")
client_print(id, print_chat, "O Guarda * %s Ativou o Box !!", szName)
client_print(id, print_chat, "Tome cuidado !!", szName)

}

case 1: {
server_cmd("mp_friendlyfire 0")
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "Box Desativado !!")
client_print(id, print_chat, "O Guarda * %s Desativou o Box !!", szName)
client_print(id, print_chat, "Modulo seguro !!", szName)
}
}


iHandler = !iHandler

return PLUGIN_HANDLED
}

public Event_DeathMsg()
{
new iKiller = read_data(1)
new iVictim = read_data(2)
new iHeadshot = read_data(3)

if(cs_get_user_team(iVictim) == CS_TEAM_T && is_user_alive(iKiller))
{
if(iHeadshot)
iCash[iKiller] += 80
else
iCash[iKiller] += 40
}
}

stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // verde
replace_all(msg, 190, "!y", "^1") // Default
replace_all(msg, 190, "!team", "^3") // Team
replace_all(msg, 190, "!team2", "^0") // Team2

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}


/********************************************* ****************************
***************************** T Friendly Fire ***************************
********************************************* *****************************/

public FwdTraceAttack(id, attacker, Float:dmg, Float:dir[3], tr, dmgbit) {
static CsTeams:ct_Team
if(iHandler) {
ct_Team = cs_get_user_team(id)
return ((ct_Team == CS_TEAM_CT) && (ct_Team == cs_get_user_team(attacker))) ? HAM_SUPERCEDE : HAM_IGNORED
}
return HAM_IGNORED
}

Last edited by klysman07; 06-23-2012 at 11:20.
klysman07 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-23-2012 , 10:51   Re: activation only 6 tr pls ^^
Reply With Quote #2

English only. If you need multi-lingual support go to the Multi-lingual section.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
klysman07
Senior Member
Join Date: Oct 2011
Old 06-23-2012 , 11:21   Re: activation only 6 tr pls ^^
Reply With Quote #3

I want this plugin can only be active when there are six or fewer TR

PLSS

^^
klysman07 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-23-2012 , 12:17   Re: activation only 6 tr pls ^^
Reply With Quote #4

post in request.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Reply


Thread Tools
Display Modes

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 06:07.


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