/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "Zevkine"
#define VERSION "1.0"
#define AUTHOR "Kalipso22"
#define REKLAM "Webdiyo"
#define YETKI ADMIN_BAN
new CT[33],bool:T[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "bePS", 1);
RegisterHam(Ham_Killed, "player", "beAO")
}
public client_connected(id){
T[id] = false
CT[id] = 0
}
public bePS(id){
if(get_user_flags(id) & YETKI){
switch(get_user_team(id))
{
case 1 :
{
if(T[id]){
CT[id] = 0
renkli_yazi(id,"!t[ !g- !n%s !g- !t] !nTerorist Takiminda Oldugun Icin CT Sayar Sifirlandi.",REKLAM);
cs_set_user_team(id,CS_TEAM_CT);
}
}
case 2 :
{
CT[id] += 1
renkli_yazi(id,"!t[ !g- !n%s !g- !t] !nTerorist Takimina Gecmene %d Raund Kaldi.",REKLAM,3 - CT[id]);
}
}
if(CT[id] >= 3){
cs_set_user_team(id, CS_TEAM_T);
CT[id] = 0;
}
}
}
public beAO(victim, attacker, shouldgib)
{
if(get_user_flags(victim) & YETKI)
{
T[victim] = true;
}
}
#if AMXX_VERSION_NUM < 183
stock renkli_yazi(const id, const input[], any:...){
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!n", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
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();
}
}
}
}
#else
stock renkli_yazi(const id, const input[], any:...){
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^x01");
replace_all(msg, 190, "!n", "^x04");
replace_all(msg, 190, "!t", "^x03");
client_print_color(id, id, msg);
}
#endif