It is currently 24 Feb 2019 03:57






Reply to topic  [ 2 posts ] 
 Cerere modificare pluign 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 04 Apr 2017 23:42
Posts: 177
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: FURIE.ROYAL-GAMES.RO
Fond eXtream: 0
imi puteti modifica astfel in cat daa mix-ul e pornit ! sis crii dinou start ! sa nu inceapa dinou ,si sa zica in chat meciul e deja pornit!

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <regex>
#include <cstrike>
#include <colorchat>
#include <hamsandwich>

#define SEMI_ACE 4
#define MAX_PLAYERS 32
#define MAXINPUT 7
#define SANITARY "abcdefg"
#define LAST_MAPS_SAVE 3
#define MAX_NAME_LENGTH 32
#define MAX_TEXT_LENGTH 192
new bool:g_restart_attempt[MAX_PLAYERS + 1]
new amx_show_activity
new hitbox_bit
new g_max_players, g_sync_creat_statustext, g_sync_creat_list
new bool:g_teammate[33]
new cvar_plugin_on
new cvar_status_on
new szName[ 32 ];


static const

TAG[ ] = "[FUN]"


new teamA = 0
new teamA1 = 0
new teamB = 0
new teamB1 = 0
new mixon = 0
new schimbate = 0
new roundnumber = 0
new Atsround
new adminId
new bool:g_bUsersCanChat = true;
new maxscreens
new screeninterval
new design;
new player
new ip[32]
new finish
new g_iFrags[33]
new iForward
new gSaveFile[64];
new gLastMapName[LAST_MAPS_SAVE][32];
new gLastMapTime[LAST_MAPS_SAVE];
new gNumLastMaps;
new authid[32]
new name[32]




public plugin_init()
{

/// Demo
register_concmd("amx_demo","demo",ADMIN_BAN,"<name> - takes a demo of a client")
register_concmd("amx_stopdemo","stopdemo",ADMIN_BAN,"<name> - stops the demo taken")

///Ss
register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>")
register_clcmd("say /ip", "show_ip")
maxscreens = register_cvar("amx_ss_max", "5")
screeninterval = register_cvar("amx_ss_interval", "1.0")
design = register_cvar("amx_ss_design", "3")

// Start Mix
register_clcmd("say !live", "startmix", ADMIN_KICK)
register_clcmd("say .live", "startmix", ADMIN_KICK)
register_clcmd("say /live", "startmix", ADMIN_KICK)
register_clcmd("say !start", "startmix", ADMIN_KICK)
register_clcmd("say .start", "startmix", ADMIN_KICK)
register_clcmd("say /start", "startmix", ADMIN_KICK)
register_clcmd("say !startmix", "startmix", ADMIN_KICK)
register_clcmd("say .startmix", "startmix", ADMIN_KICK)
register_clcmd("say /startmix", "startmix", ADMIN_KICK)
register_clcmd("say_team /start", "startmix", ADMIN_KICK)
register_clcmd("say_team !start", "startmix", ADMIN_KICK)


//Autoswitch teams
register_logevent( "roundend", 2, "1=Round_End" );
register_event( "TextMsg","restart","a","2&#Game_C", "2&#Game_W" ); // Event for "Game Commencing" TextMsg and "Game Will Restart in X Seconds" TextMsg

Atsround = register_cvar( "amx_atsrounds", "15" );


/// Interp
register_clcmd("say !interp", "interp", ADMIN_KICK)
register_clcmd("say .interp", "interp", ADMIN_KICK)
register_clcmd("say /interp", "interp", ADMIN_KICK)
register_clcmd("say_team /interp", "interp", ADMIN_KICK)
register_clcmd("say_team !interp", "interp", ADMIN_KICK)
register_clcmd("say_team .interp", "interp", ADMIN_KICK)


register_event("HLTV", "new_round", "a", "1=0", "2=0")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")



//// ACE

register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
register_event( "DeathMsg", "EventDeathMsg", "a" );

register_logevent( "LogEventRoundEnd", 2, "1=Round_End" );

iForward = CreateMultiForward( "FwdPlayerDidAceOrSemi", ET_STOP, FP_CELL, FP_CELL );

/////HARTI
register_clcmd("say /last", "CmdLastMaps");
register_clcmd("say !last", "CmdLastMaps");
register_clcmd("say /harti", "CmdLastMaps");
register_clcmd("say !harti", "CmdLastMaps");

get_datadir(gSaveFile, charsmax(gSaveFile));
add(gSaveFile, charsmax(gSaveFile), "lastmaps.txt");

new f = fopen(gSaveFile, "rt");

if(f) {
new line[64], minutes[12];

while(!feof(f) && gNumLastMaps < LAST_MAPS_SAVE) {
fgets(f, line, charsmax(line));
trim(line);

if(line[0]) {
parse(line, gLastMapName[gNumLastMaps], charsmax(gLastMapName[]), minutes, charsmax(minutes));
gLastMapTime[gNumLastMaps++] = str_to_num(minutes);
}
}

fclose(f);
}


}


public t_win() {
if ( schimbate == 0 ) {
teamA = teamA+1
}
else {
teamB = teamB +1
}
}

public ct_win() {
if ( schimbate == 0 ) {
teamB = teamB +1
}
else {
teamA = teamA +1
}

}

public new_round(){
if ( mixon == 1)
{
if (schimbate == 0) {

if ( teamA > teamB ) {

ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d pentru echipa T", teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d pentru CT", teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d (egalitate)", teamB ,teamA);
}
}

if ( schimbate == 1 )
{
if ( teamA == 16 || teamB == 16) {
if ( teamA > teamB ) {

ColorChat(0, RED, "[MIX]^x01 Mix-ul a fost castigat de echipa ^x04 CT");
ColorChat(0, RED, "[MIX]^x01 Scorul fiind: ^x04 %d - %d ",teamA, teamB);
ColorChat(0, RED, "[MIX]^x01 Tasteaza !harti in chat pentru a vedea ultimele 3 harti jucate.",teamA, teamB);



mixon = 0
schimbate = 0
set_cvar_string ( "sv_restart", "1" );
}

if ( teamB > teamA ) {
ColorChat(0, RED, "[MIX]^x01 Mix-ul a fost castigat de echipa ^x04 T");
ColorChat(0, RED, "[MIX]^x01 Scorul fiind: ^x04 %d - %d ",teamB,teamA);
ColorChat(0, RED, "[MIX]^x01 Tasteaza !harti in chat pentru a vedea ultimele 3 harti jucate.",teamA, teamB);



mixon = 0
schimbate = 0
set_cvar_string ( "sv_restart", "1" );
set_cvar_string ( "mp_freezetime", "0");
set_cvar_string ( "mp_startmoney", "16000");
}
} else {
if ( teamA > teamB ) {
ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d pentru CT",teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d pentru T",teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d (egalitate)",teamB ,teamA);
}
}

}
}
}


public client_disconnect(id){
if (get_playersnum() == 0)
set_cvar_string("sv_password", "");
}

public startmix(id){

if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")


return PLUGIN_HANDLED
}
else {


set_cvar_string ( "sv_restart", "5" );
set_cvar_string ( "mp_freezetime", "5" );
set_cvar_string ( "mp_startmoney", "900" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "mp_roundtime", "2" );
set_cvar_string ( "mp_timelimit", "0" );
set_cvar_string ( "mp_forchasecam", "2" );
set_cvar_string ( "mp_buytime", "1.5" );
set_cvar_string ( "mp_c4timer", "35" );
set_cvar_string ( "amx_atsrounds", "15" );





mixon = 1;
if (schimbate == 1)
{
teamA = teamA1
teamB = teamB1
roundnumber = 0
} else {
schimbate = 0;
teamA = 0
teamB = 0
teamA1 = 0
teamB1= 0
roundnumber = 0
}


get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!start]^x01 Mix-ul va porni in 5 secunde. -^x04%s^x01 ", szName );




}
return PLUGIN_HANDLED
}

public interp(id){

if(!is_user_admin(id) && ADMIN_BAN)
{
client_print(id, print_chat, "Ai nevoie de admin pentru a avea acces la aceasta comanda.")


return PLUGIN_HANDLED
} else {
client_cmd(0, "ex_interp 0.01");
client_cmd(0, "rate 25000");
client_cmd(0, "cl_updaterate 101");
client_cmd(0, "cl_cmdrate 101");
client_cmd(0, "fps_max 101");

ColorChat(0,RED, "[!interp] ^x01S-a setat interp-ul. Jucatorii pot verifica tastand !setari in chat (consola)")

}
return PLUGIN_HANDLED
}

public roundend()
{
roundnumber++;

if (schimbate == 1 && roundnumber == 31)
{
ColorChat(0, RED, "[MIX] ^x01Echipele au reusit sa aduca scorul la egal ^x04 15 - 15 ");


mixon = 0
schimbate = 0
set_cvar_string ( "sv_restart", "1" );
}
else if( roundnumber >= get_pcvar_num( Atsround ) )
{
new players[32], num;
get_players( players, num );

for( new i; i < num; i++ )
add_delay( players[i] ); // Prevent Server Crash with a lot of people.

}
}

add_delay( id )
{
switch( id )
{
case 1..7: set_task( 0.1, "changeTeam", id );
case 8..15: set_task( 0.2, "changeTeam", id );
case 16..23: set_task( 0.3, "changeTeam", id );
case 24..32: set_task( 0.4, "changeTeam", id );
}
}

public changeTeam( id )
{
switch( cs_get_user_team( id ) )
{
case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );

case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT );
}

roundnumber = 0;
schimbate = 1
teamA1 = teamA
teamB1 = teamB

ColorChat(0, RED, "[!comenzi] ^x01 Echipele s-au schimbat intre ele ");
set_cvar_string ( "sv_restart", "1" );

}




public scor(id){

if ( mixon == 1 )
{
if (schimbate == 0) {

if ( teamA > teamB ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04 T",teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04 CT",teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d ^x04 (EGAL)",teamB ,teamA);
}
} else {
if ( teamA > teamB ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04CT",teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04T",teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d ^x04 (EGAL)",teamB ,teamA);
}
}
}
else
{
ColorChat(id,RED, "[!comenzi] ^x01 Momentan nu ruleaza niciun mix. Un admin va scrie !start pentru pornire.")
}

return PLUGIN_HANDLED
}

public clcmd_fullupdate() {
return PLUGIN_HANDLED
}
public event_restart_attempt(){
new players[32], num
get_players(players, num, "a")
for ( new i; i < num; ++i )
g_restart_attempt[players[i]] = true
}
public event_hud_reset(id){
if (g_restart_attempt[id]) {
g_restart_attempt[id] = false
return
}
set_properties(id)
}
public set_properties(id){
set_user_hitzones(0, 0, get_pcvar_num(hitbox_bit))
}
public admin_set_hitbox(id, level, cid){
new flags[MAXINPUT+1], name[32], error[128], result_code, bit = 1
if ( !cmd_access(id, level, cid, 2) )
return PLUGIN_HANDLED
read_argv(1, flags, MAXINPUT)
strtolower(flags)
new Regex:re = regex_match(flags, "0", result_code, error, 127)
if (re >= REGEX_OK) { //This if/else will detect strange syntax, even if it doesn't need to
regex_free(re)
if (flags[0] == '0') {
if (flags[1] == '^0'){
bit = 0;
} else {
bit = 0; //they have a 0 followed by unnecessary characters
}
} else{
bit = 1 // there is a 0 mixed in with other characters
}
} else {
new buf[2] = {0,0}
for (new i = 0; i<MAXINPUT; i++){
buf[0] = flags[i];
re = regex_match(SANITARY, buf[0], result_code, error, 127)
if (re >= REGEX_OK){
regex_free(re)
} else {
flags[i] = 0 //They have weird characters in here
}
}
}
if (bit) {
new buf2[2] = {97,0} //97 = a.
for (new j = 2; j <= 128; j*=2, buf2[0]++){
re = regex_match(flags, buf2, result_code, error, 127)
if (re >= REGEX_OK){
regex_free(re)
bit += j
}
}
}
if (bit == 1){
//They didn't type any valid flags at all
}
set_pcvar_num(hitbox_bit, bit)
get_user_name(id, name, 31)
switch ( get_pcvar_num(amx_show_activity) ){
case 2: ColorChat(0, RED, "[OLD!] ^x01 Admin-ul ^x04 %s ^x01 a pornit/oprit modul HS ONLY ", name)

}
set_properties(0)
log_amx("[AMXX] ADMIN %s: set hitboxes to %d", name, bit)
return PLUGIN_HANDLED
}

public concmd_screen(id, level, cid)
{
if(!is_user_admin(id) && ADMIN_KICK)
{
return PLUGIN_HANDLED
}

new arg1[24], arg2[4]
read_argv(1, arg1, 23)
read_argv(2, arg2, 3)

new screens = str_to_num(arg2)
new maxss = get_pcvar_num(maxscreens)

if(screens > maxss) //too many ss?
{
console_print(id, "Ai depasit limita pozelor.")

return PLUGIN_HANDLED
}

player = cmd_target(id, arg1, 1)
if (!player) //the player has exited the sv or he didnt existed
{
return PLUGIN_HANDLED
}
finish = screens

new Float:interval = get_pcvar_float(screeninterval) //a set_task for each "amx_ss nickname nr_of_ss"
new array[2]
array[0] = id //save usefull data in a vector so it can be reused
array[1] = player
set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)

return PLUGIN_HANDLED
}

public ss_propriuzis(array[2])
{
//take data and set them accordingly
new player = array[1]
new id = array[0]

//save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!
new timestamp[32], name[32], adminname[32]
get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31)
get_user_name(player, name, 31)
get_user_name(id, adminname, 31)
get_user_ip(player, ip, 31)

//Clasic Design
if(get_pcvar_num(design) == 0)
{

client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
ColorChat(id, RED, "[SS] ^x01 Ai executat cu succes comanda amx_ss pe jucatorul ^x03 %s", name);
client_cmd(player, "snapshot") //ss
}
//Doar Playerului
else if(get_pcvar_num(design) == 1)
{

}
//HUD Message doar Playerului
else if(get_pcvar_num(design) == 2)
{


}
//Full
else if(get_pcvar_num(design) == 3)
{
ColorChat(id, RED, " ^x01 Poza executata asupra lui ^x03 %s ^x01 de admin-ul ^x04 %s ^x01 (%s) ", name, adminname, timestamp)
ColorChat(player, RED, " ^x01 Poza executata asupra lui ^x03 %s ^x01 de admin-ul ^x04 %s ^x01 (%s) ", name, adminname, timestamp)
client_cmd(player, "snapshot") //ss


}
console_print(id, "%s 's ip-ul este %s!",name,ip)
console_print(id, "%s 's ip-ul este %s!",name,ip)
console_print(id, "%s 's ip-ul este %s!",name,ip)
finish = finish - 1;

if(finish == 0)
{


}

return PLUGIN_CONTINUE;
}

public show_ip(id)
{
console_print(id, "Ultimul IP este: %s!",ip)
}


public demo(id,level,cid){
if(!cmd_access(id,level,cid,1))
return 0;

new cmd[32], mapname[32], name[32], time[32], name2[32]
read_argv(1, cmd, 31);
new player = cmd_target(id, cmd, 5);

if (!player)
return 0;
get_time("%m/%d/%Y - %H:%M:%S",time,31)
get_user_name(player,name,31)
get_user_name(id,name2,31)
get_mapname(mapname,31)
client_cmd(player,"record %s_%s.dem",name,mapname)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
ColorChat(id, RED, "^x01 Ai pornit demo-ul jucatorului ^x03 %s. ^x01 Doar tu vezi acest mesaj.", name)
log_amx("%s Started The Demo On %s, Time %s",name, name2,time)
return 0;
}

public stopdemo(id,level,cid){
if(!cmd_access(id,level,cid,1))
return 0;

new cmd[32], name[32], time[32], name2[32]
read_argv(1, cmd, 31);
new player = cmd_target(id, cmd, 5);

if (!player)
return 0;
get_time("%m/%d/%Y - %H:%M:%S",time,31)
get_user_name(player,name,31)
get_user_name(id,name2,31)
client_cmd(player,"stop")
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
ColorChat(id, RED, "^x01 Ai oprit demo-ul jucatorului ^x03 %s. ^x01 Doar tu vezi acest mesaj.", name)
log_amx("%s Started The Demo On %s, Time %s",name, name2,time)
return 0;
}

public ClCmdSay( id )
{

static szArgs[ 192 ];
read_args( szArgs, sizeof ( szArgs ) -1 );

if( !szArgs[ 0 ] ) return PLUGIN_CONTINUE;

if( !g_bUsersCanChat )
{

}

return g_bUsersCanChat ? PLUGIN_CONTINUE : PLUGIN_HANDLED;
}

public setari(id)
{
adminId = id;
console_print(id, "Nume - IP - SteamID - INTERP");
console_print(id, " --------------------------------------------------------");

new players[32], num;
get_players(players, num);

for(new i = 0 ; i < num ; i++)
{

query_client_cvar(players[i], "ex_interp", "cvar_result_func")

}
console_print(id, "----------------------------------------------");
ColorChat(id, RED, "[!setari] ^x01 Deschide consola. Ordinea informatiilor: NUME-IP-STEAMID-INTERP.")

return 1;
}

public cvar_result_func(playerId, const cvar[], const value[]) {

new name[32];
new ipeki[32];
new authid[32];
get_user_name(playerId, name, 31)
get_user_ip(playerId, ipeki, 31, 1)
get_user_authid(playerId, authid, 31)

console_print(adminId, "%s - %s - %s - %s", name, ipeki, authid, value);
return PLUGIN_CONTINUE
}

public plugin_end( )
{
DestroyForward( iForward );
}

public client_connect( id )
{
g_iFrags[ id ] = 0;
}

public EventNewRound( )
{
arrayset( g_iFrags, 0, sizeof g_iFrags );
}

public EventDeathMsg( )
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );

CheckAce( iVictim );

if( !iKiller || iKiller == iVictim || cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
{
return PLUGIN_CONTINUE;
}

g_iFrags[ iKiller ]++;

return PLUGIN_CONTINUE;
}

public LogEventRoundEnd( )
{
new iPlayers[ 32 ], iNum, player;

get_players( iPlayers, iNum, "ch" );

for( new i = 0; i < iNum; i++ )
{
player = iPlayers[ i ];

if( g_iFrags[ player ] >= SEMI_ACE )
{
DidAceOrSemi( player );

if( g_iFrags[ player ] == SEMI_ACE + 1 )
{
return PLUGIN_CONTINUE;
}
}
}

return PLUGIN_CONTINUE;
}

public CheckAce( id )
{
if( g_iFrags[ id ] >= SEMI_ACE )
{
DidAceOrSemi( id );
}

g_iFrags[ id ] = 0;
}

public DidAceOrSemi( id )
{
new iReturn = PLUGIN_CONTINUE;

ExecuteForward( iForward, iReturn, id, g_iFrags[ id ] );

if( iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
{
return PLUGIN_HANDLED;
}

new szName[ 32 ];

get_user_name( id, szName, sizeof szName - 1 );

ColorChat( 0, GREEN, "%s^x03 %s^x01 a realizat un a%s ^x03%sACE! ^x01 Felicitari!",
TAG, szName, g_iFrags [ id ] == SEMI_ACE ? "" : "n", g_iFrags [ id ] == SEMI_ACE ? "SEMI-" : "" );

client_cmd( 0, "spk vox/buzwarn" );

return PLUGIN_HANDLED
}
public clcmd_money(client)
{
if (!get_pcvar_num(cvar_plugin_on))
{
client_print(client, print_chat, "[AMXX]: Show Teammate's Money was off.")
return PLUGIN_HANDLED
}
show_money(client)
return PLUGIN_CONTINUE
}

public player_spawn(client)
{
remove_task(client)
if (is_user_alive(client) && get_pcvar_num(cvar_plugin_on))
{
set_task(1.0, "show_money", client)
}
}

public show_money(client)
{
static message[1024];
static name[32];

new money, id, len;

len = format(message, charsmax(message), "Situatia financiara a coechipierilor:^n^n");
for (id = 1; id <= g_max_players; id++)
{
if (id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
{
money = cs_get_user_money(id);
get_user_name(id, name, 31);
len += format(message[len], charsmax(message) - len, "%-22.22s: %d^n", name, money);
}
}
set_hudmessage(18, 113, 255, 0.05, 0.35, 0, 0.02, 5.0, 0.1, 0.2, 2);
ShowSyncHudMsg(client, g_sync_creat_list, message);
}

public set_team(id)
g_teammate[id] = bool:(read_data(2) == 1);

public show_teammate_money(id)
{
if (!get_pcvar_num(cvar_plugin_on))
return PLUGIN_HANDLED
if(!is_user_bot(id) && is_user_connected(id) && get_pcvar_num(cvar_status_on))
{
static name[32]

new pid = read_data(2)
new red = 0, blue = 0

if (cs_get_user_team(pid) == CS_TEAM_T)
red = 255
else if(cs_get_user_team(pid) == CS_TEAM_CT)
blue = 255

get_user_name(pid, name, charsmax(name))
new money = cs_get_user_money(pid)
if (g_teammate[id])
{
set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8)
ShowSyncHudMsg(id, g_sync_creat_statustext, "Friend:%s -- Money:%d", name, money)
}
else {
set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8)
ShowSyncHudMsg(id, g_sync_creat_statustext, "Enemy:%s", name)
}
}
return PLUGIN_CONTINUE
}

public client_disconnect2(client){

remove_task(client)
}


public cmdct(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);

if (!player)
{
return PLUGIN_HANDLED;
}

if (cs_get_user_team(player) == CS_TEAM_CT)
{
console_print(id, "Jucatorul este deja in echipa CT");
return PLUGIN_HANDLED;
}

new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);

if (is_user_alive (player) )
{
user_silentkill(player);
}

cs_set_user_team(player,CS_TEAM_CT);
log_amx("Admin %s: Task amx_ct/t %s",name, name2);
ColorChat(0, RED, "[/ct] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la CONTRA-TERORISTI -^x04%s", name2, name);

return PLUGIN_HANDLED;
}

public cmdt(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);

if (!player)
{
return PLUGIN_HANDLED;
}

if (cs_get_user_team(player) == CS_TEAM_T)
{
console_print(id, "Jucatorul este deja in echipa T");
return PLUGIN_HANDLED;
}

new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);

if (is_user_alive (player) )
{
user_silentkill(player);
}

cs_set_user_team(player,CS_TEAM_T);
log_amx("Admin %s: Task amx_t %s",name, name2);
ColorChat(0, RED, "[/t] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la TERORISTI -^x04%s", name2, name);

return PLUGIN_HANDLED;
}

public cmdspec(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);

if (!player)
{
return PLUGIN_HANDLED;
}

if (cs_get_user_team(player) == CS_TEAM_SPECTATOR)
{
console_print(id, "Jucatorul este deja in spectatori");
return PLUGIN_HANDLED;
}

new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);

if (is_user_alive (player) )
{
user_silentkill(player);
}

cs_set_user_team(player,CS_TEAM_SPECTATOR);
log_amx("Admin %s: Task amx_spec %s",name, name2);
ColorChat(0, RED, "[/spec] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la SPECTATORI -^x04%s", name2, name);

return PLUGIN_HANDLED;
}

public cmd_spec (id, level, cid) { /////////ASTA ESTE PROBLEMA PLUGIN-ULUI
//Verificam daca are acces la comanda
if(!cmd_access(id, level, cid, 2)) {
//Mesajul care ii apare
client_print(id,print_console,"Nu ai acces la aceasta comanda");
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new iPlayers[ 32 ], iNum, iPlayer
get_players( iPlayers, iNum )

for ( new a = 0; a < iNum; a++ )
{
iPlayer = iPlayers[ a ];

switch ( cs_get_user_team( iPlayer ) )

{
case CS_TEAM_T, CS_TEAM_CT:
{
if(is_user_alive( iPlayer ))
user_silentkill( iPlayer );
cs_set_user_team( iPlayer, CS_TEAM_SPECTATOR );
set_cvar_string ( "sv_restart", "5" );
}
}
}

ColorChat(0,RED,"[!specall] ^x01Jucatorii au fost transferati la spectatori pentru runda alegerilor. -^x04%s^x01 ", szName );
return 1;
}

public admin_slash(id)
{
new sArg[MAX_NAME_LENGTH+1]

read_argv(1,sArg,MAX_NAME_LENGTH)

if ( sArg[0] == '/' ) {

new sCommand[MAX_TEXT_LENGTH+1]
new sMessage[MAX_TEXT_LENGTH+1]

read_args(sMessage,MAX_TEXT_LENGTH)
remove_quotes(sMessage)
replace(sMessage,MAX_TEXT_LENGTH,"/","")



format(sCommand,MAX_TEXT_LENGTH,"amx_%s",sMessage)
client_cmd(id,sCommand)

}
return PLUGIN_CONTINUE
}

public plugin_end2() {
new minutes = floatround(get_gametime() / 60.0, floatround_ceil);

new map[32];
get_mapname(map, charsmax(map));

new f = fopen(gSaveFile, "wt");

fprintf(f, "^"%s^" %d", map, minutes);

if(gNumLastMaps == LAST_MAPS_SAVE) {
gNumLastMaps--;
}

for(new i = 0; i < gNumLastMaps; i++) {
fprintf(f, "^n^"%s^" %d", gLastMapName[i], gLastMapTime[i]);
}

fclose(f);
}

public CmdLastMaps(id) {
if(gNumLastMaps) {
new maps[192], len;
for(new i = 0; i < gNumLastMaps; i++) {
len += formatex(maps[len], charsmax(maps) - len, "%s%s (%dmin)", len ? ", " : "", gLastMapName[i], gLastMapTime[i]);
}

ColorChat(id, RED, "[!harti] ^x01 Ultimele 3 harti jucate: ^x04 %s", maps);
} else {
client_print(id, print_chat, "Nu este nicio harta anterioara.");
}
}

public pass(id, level, cid)
{
if(!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

new cmd[32], password[128]

read_argv(0, cmd, 31)
read_args(password, 127)
replace(password, 127, cmd, "")
format(password, 127, "%s", password)

get_user_name(id, name, 31)
get_user_authid(id, authid, 31)
switch (get_cvar_num("amx_show_activity")) {
case 2: ColorChat(0,RED,"[/pass] ^x01 Parola a fost setata pe server. Tasteaza /nopass pentru a o scoate. - ^x04 %s",name)
case 1: ColorChat(0,RED,"Este deja o parola pe server.")
}
log_amx("Cmd: ^"%s<%d><%s>^" set the server password to %s",name,get_user_userid(id),authid,password)
set_cvar_string("sv_password", password)

return PLUGIN_HANDLED
}

public nopass(id, level, cid)
{
if(!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

get_user_name(id, name, 31)
get_user_authid(id, authid, 31)
switch (get_cvar_num("amx_show_activity")) {
case 2: ColorChat(0,RED,"[/nopass]^x01 Parola a fost scoasa de pe server. - ^x04 %s",name)
case 1: client_print(0,print_chat,"A fost scoasa deja parola de pe server.")
}
log_amx("Cmd: ^"%s<%d><%s>^" removed server password", name,get_user_userid(id),authid)
set_cvar_string("sv_password", "")

return PLUGIN_HANDLED
}

_________________
DETINATOR :FURIEN.ROYAL-GAMES.RO


08 Feb 2019 19:03
Profile multumesc WWW
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 10 Oct 2014 05:21
Posts: 3582
Location: Roman, Neamț
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Scripter eXtreamCS
Moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <regex>
#include <cstrike>
#include <colorchat>
#include <hamsandwich>

#define SEMI_ACE 4
#define MAX_PLAYERS 32
#define MAXINPUT 7
#define SANITARY "abcdefg"
#define LAST_MAPS_SAVE 3
#define MAX_NAME_LENGTH 32
#define MAX_TEXT_LENGTH 192
new bool:g_restart_attempt[MAX_PLAYERS + 1]
new amx_show_activity
new hitbox_bit
new g_max_players, g_sync_creat_statustext, g_sync_creat_list
new bool:g_teammate[33]
new cvar_plugin_on
new cvar_status_on
new szName[ 32 ];


static const

TAG[ ] = "[FUN]"


new teamA = 0
new teamA1 = 0
new teamB = 0
new teamB1 = 0
new mixon = 0
new schimbate = 0
new roundnumber = 0
new Atsround
new adminId
new bool:g_bUsersCanChat = true;
new maxscreens
new screeninterval
new design;
new player
new ip[32]
new finish
new g_iFrags[33]
new iForward
new gSaveFile[64];
new gLastMapName[LAST_MAPS_SAVE][32];
new gLastMapTime[LAST_MAPS_SAVE];
new gNumLastMaps;
new authid[32]
new name[32]




public plugin_init()
{

/// Demo
register_concmd("amx_demo","demo",ADMIN_BAN,"<name> - takes a demo of a client")
register_concmd("amx_stopdemo","stopdemo",ADMIN_BAN,"<name> - stops the demo taken")

///Ss
register_concmd("amx_ss", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>")
register_clcmd("say /ip", "show_ip")
maxscreens = register_cvar("amx_ss_max", "5")
screeninterval = register_cvar("amx_ss_interval", "1.0")
design = register_cvar("amx_ss_design", "3")

// Start Mix
register_clcmd("say !live", "startmix", ADMIN_KICK)
register_clcmd("say .live", "startmix", ADMIN_KICK)
register_clcmd("say /live", "startmix", ADMIN_KICK)
register_clcmd("say !start", "startmix", ADMIN_KICK)
register_clcmd("say .start", "startmix", ADMIN_KICK)
register_clcmd("say /start", "startmix", ADMIN_KICK)
register_clcmd("say !startmix", "startmix", ADMIN_KICK)
register_clcmd("say .startmix", "startmix", ADMIN_KICK)
register_clcmd("say /startmix", "startmix", ADMIN_KICK)
register_clcmd("say_team /start", "startmix", ADMIN_KICK)
register_clcmd("say_team !start", "startmix", ADMIN_KICK)


//Autoswitch teams
register_logevent( "roundend", 2, "1=Round_End" );
register_event( "TextMsg","restart","a","2&#Game_C", "2&#Game_W" ); // Event for "Game Commencing" TextMsg and "Game Will Restart in X Seconds" TextMsg

Atsround = register_cvar( "amx_atsrounds", "15" );


/// Interp
register_clcmd("say !interp", "interp", ADMIN_KICK)
register_clcmd("say .interp", "interp", ADMIN_KICK)
register_clcmd("say /interp", "interp", ADMIN_KICK)
register_clcmd("say_team /interp", "interp", ADMIN_KICK)
register_clcmd("say_team !interp", "interp", ADMIN_KICK)
register_clcmd("say_team .interp", "interp", ADMIN_KICK)


register_event("HLTV", "new_round", "a", "1=0", "2=0")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")



//// ACE

register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
register_event( "DeathMsg", "EventDeathMsg", "a" );

register_logevent( "LogEventRoundEnd", 2, "1=Round_End" );

iForward = CreateMultiForward( "FwdPlayerDidAceOrSemi", ET_STOP, FP_CELL, FP_CELL );

/////HARTI
register_clcmd("say /last", "CmdLastMaps");
register_clcmd("say !last", "CmdLastMaps");
register_clcmd("say /harti", "CmdLastMaps");
register_clcmd("say !harti", "CmdLastMaps");

get_datadir(gSaveFile, charsmax(gSaveFile));
add(gSaveFile, charsmax(gSaveFile), "lastmaps.txt");

new f = fopen(gSaveFile, "rt");

if(f) {
new line[64], minutes[12];

while(!feof(f) && gNumLastMaps < LAST_MAPS_SAVE) {
fgets(f, line, charsmax(line));
trim(line);

if(line[0]) {
parse(line, gLastMapName[gNumLastMaps], charsmax(gLastMapName[]), minutes, charsmax(minutes));
gLastMapTime[gNumLastMaps++] = str_to_num(minutes);
}
}

fclose(f);
}


}


public t_win() {
if ( schimbate == 0 ) {
teamA = teamA+1
}
else {
teamB = teamB +1
}
}

public ct_win() {
if ( schimbate == 0 ) {
teamB = teamB +1
}
else {
teamA = teamA +1
}

}

public new_round(){
if ( mixon == 1)
{
if (schimbate == 0) {

if ( teamA > teamB ) {

ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d pentru echipa T", teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d pentru CT", teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(0, RED, "[!comenzi]^x01 Scorul este ^x04 %d - %d (egalitate)", teamB ,teamA);
}
}

if ( schimbate == 1 )
{
if ( teamA == 16 || teamB == 16) {
if ( teamA > teamB ) {

ColorChat(0, RED, "[MIX]^x01 Mix-ul a fost castigat de echipa ^x04 CT");
ColorChat(0, RED, "[MIX]^x01 Scorul fiind: ^x04 %d - %d ",teamA, teamB);
ColorChat(0, RED, "[MIX]^x01 Tasteaza !harti in chat pentru a vedea ultimele 3 harti jucate.",teamA, teamB);



mixon = 0
schimbate = 0
set_cvar_string ( "sv_restart", "1" );
}

if ( teamB > teamA ) {
ColorChat(0, RED, "[MIX]^x01 Mix-ul a fost castigat de echipa ^x04 T");
ColorChat(0, RED, "[MIX]^x01 Scorul fiind: ^x04 %d - %d ",teamB,teamA);
ColorChat(0, RED, "[MIX]^x01 Tasteaza !harti in chat pentru a vedea ultimele 3 harti jucate.",teamA, teamB);



mixon = 0
schimbate = 0
set_cvar_string ( "sv_restart", "1" );
set_cvar_string ( "mp_freezetime", "0");
set_cvar_string ( "mp_startmoney", "16000");
}
} else {
if ( teamA > teamB ) {
ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d pentru CT",teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d pentru T",teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(0, RED, "[MIX]^x01 Scorul este ^x04 %d - %d (egalitate)",teamB ,teamA);
}
}

}
}
}


public client_disconnect(id){
if (get_playersnum() == 0)
set_cvar_string("sv_password", "");
}

public startmix(Player)
{
if(!(get_user_flags(Player) & ADMIN_KICK))
{
client_print(Player, print_chat, "Doar un admin poate porni un mix");
return;
}

if(mixon == 1)
{
client_print(Player, print_chat, "MIX-ul este deja pornit");
return;
}

set_cvar_string("sv_restart", "5");
set_cvar_string("mp_freezetime", "5");
set_cvar_string("mp_startmoney", "900");
set_cvar_string("mp_friendlyfire", "0");
set_cvar_string("mp_roundtime", "2");
set_cvar_string("mp_timelimit", "0");
set_cvar_string("mp_forchasecam", "2");
set_cvar_string("mp_buytime", "1.5");
set_cvar_string("mp_c4timer", "35");
set_cvar_string("amx_atsrounds", "15");

mixon = 1;

if(schimbate == 1)
{
teamA = teamA1;
teamB = teamB1;
roundnumber = 0;
}
else
{
teamA = teamB = teamA1 = teamB1 = roundnumber = 0;
}


get_user_name(Player, szName, charsmax(szName));
ColorChat(0, RED, "[!start]^x01 Mix-ul va porni in 5 secunde. -^x04%s^x01", szName);
return;
}


public interp(id){

if(!is_user_admin(id) && ADMIN_BAN)
{
client_print(id, print_chat, "Ai nevoie de admin pentru a avea acces la aceasta comanda.")


return PLUGIN_HANDLED
} else {
client_cmd(0, "ex_interp 0.01");
client_cmd(0, "rate 25000");
client_cmd(0, "cl_updaterate 101");
client_cmd(0, "cl_cmdrate 101");
client_cmd(0, "fps_max 101");

ColorChat(0,RED, "[!interp] ^x01S-a setat interp-ul. Jucatorii pot verifica tastand !setari in chat (consola)")

}
return PLUGIN_HANDLED
}

public roundend()
{
roundnumber++;

if (schimbate == 1 && roundnumber == 31)
{
ColorChat(0, RED, "[MIX] ^x01Echipele au reusit sa aduca scorul la egal ^x04 15 - 15 ");


mixon = 0
schimbate = 0
set_cvar_string ( "sv_restart", "1" );
}
else if( roundnumber >= get_pcvar_num( Atsround ) )
{
new players[32], num;
get_players( players, num );

for( new i; i < num; i++ )
add_delay( players[i] ); // Prevent Server Crash with a lot of people.

}
}

add_delay( id )
{
switch( id )
{
case 1..7: set_task( 0.1, "changeTeam", id );
case 8..15: set_task( 0.2, "changeTeam", id );
case 16..23: set_task( 0.3, "changeTeam", id );
case 24..32: set_task( 0.4, "changeTeam", id );
}
}

public changeTeam( id )
{
switch( cs_get_user_team( id ) )
{
case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );

case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT );
}

roundnumber = 0;
schimbate = 1
teamA1 = teamA
teamB1 = teamB

ColorChat(0, RED, "[!comenzi] ^x01 Echipele s-au schimbat intre ele ");
set_cvar_string ( "sv_restart", "1" );

}




public scor(id){

if ( mixon == 1 )
{
if (schimbate == 0) {

if ( teamA > teamB ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04 T",teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04 CT",teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d ^x04 (EGAL)",teamB ,teamA);
}
} else {
if ( teamA > teamB ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04CT",teamA,teamB );
}
if ( teamB > teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d pentru ^x04T",teamB ,teamA);
}
if ( teamB == teamA ) {
ColorChat(id, RED, "^x03 Scorul este %d - %d ^x04 (EGAL)",teamB ,teamA);
}
}
}
else
{
ColorChat(id,RED, "[!comenzi] ^x01 Momentan nu ruleaza niciun mix. Un admin va scrie !start pentru pornire.")
}

return PLUGIN_HANDLED
}

public clcmd_fullupdate() {
return PLUGIN_HANDLED
}
public event_restart_attempt(){
new players[32], num
get_players(players, num, "a")
for ( new i; i < num; ++i )
g_restart_attempt[players[i]] = true
}
public event_hud_reset(id){
if (g_restart_attempt[id]) {
g_restart_attempt[id] = false
return
}
set_properties(id)
}
public set_properties(id){
set_user_hitzones(0, 0, get_pcvar_num(hitbox_bit))
}
public admin_set_hitbox(id, level, cid){
new flags[MAXINPUT+1], name[32], error[128], result_code, bit = 1
if ( !cmd_access(id, level, cid, 2) )
return PLUGIN_HANDLED
read_argv(1, flags, MAXINPUT)
strtolower(flags)
new Regex:re = regex_match(flags, "0", result_code, error, 127)
if (re >= REGEX_OK) { //This if/else will detect strange syntax, even if it doesn't need to
regex_free(re)
if (flags[0] == '0') {
if (flags[1] == '^0'){
bit = 0;
} else {
bit = 0; //they have a 0 followed by unnecessary characters
}
} else{
bit = 1 // there is a 0 mixed in with other characters
}
} else {
new buf[2] = {0,0}
for (new i = 0; i<MAXINPUT; i++){
buf[0] = flags[i];
re = regex_match(SANITARY, buf[0], result_code, error, 127)
if (re >= REGEX_OK){
regex_free(re)
} else {
flags[i] = 0 //They have weird characters in here
}
}
}
if (bit) {
new buf2[2] = {97,0} //97 = a.
for (new j = 2; j <= 128; j*=2, buf2[0]++){
re = regex_match(flags, buf2, result_code, error, 127)
if (re >= REGEX_OK){
regex_free(re)
bit += j
}
}
}
if (bit == 1){
//They didn't type any valid flags at all
}
set_pcvar_num(hitbox_bit, bit)
get_user_name(id, name, 31)
switch ( get_pcvar_num(amx_show_activity) ){
case 2: ColorChat(0, RED, "[OLD!] ^x01 Admin-ul ^x04 %s ^x01 a pornit/oprit modul HS ONLY ", name)

}
set_properties(0)
log_amx("[AMXX] ADMIN %s: set hitboxes to %d", name, bit)
return PLUGIN_HANDLED
}

public concmd_screen(id, level, cid)
{
if(!is_user_admin(id) && ADMIN_KICK)
{
return PLUGIN_HANDLED
}

new arg1[24], arg2[4]
read_argv(1, arg1, 23)
read_argv(2, arg2, 3)

new screens = str_to_num(arg2)
new maxss = get_pcvar_num(maxscreens)

if(screens > maxss) //too many ss?
{
console_print(id, "Ai depasit limita pozelor.")

return PLUGIN_HANDLED
}

player = cmd_target(id, arg1, 1)
if (!player) //the player has exited the sv or he didnt existed
{
return PLUGIN_HANDLED
}
finish = screens

new Float:interval = get_pcvar_float(screeninterval) //a set_task for each "amx_ss nickname nr_of_ss"
new array[2]
array[0] = id //save usefull data in a vector so it can be reused
array[1] = player
set_task(interval, "ss_propriuzis", 0, array,2, "a", screens)

return PLUGIN_HANDLED
}

public ss_propriuzis(array[2])
{
//take data and set them accordingly
new player = array[1]
new id = array[0]

//save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL!
new timestamp[32], name[32], adminname[32]
get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31)
get_user_name(player, name, 31)
get_user_name(id, adminname, 31)
get_user_ip(player, ip, 31)

//Clasic Design
if(get_pcvar_num(design) == 0)
{

client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
client_print(id,print_console, "Comanda amx_ss a fost executata asupra jucatorului ales");
ColorChat(id, RED, "[SS] ^x01 Ai executat cu succes comanda amx_ss pe jucatorul ^x03 %s", name);
client_cmd(player, "snapshot") //ss
}
//Doar Playerului
else if(get_pcvar_num(design) == 1)
{

}
//HUD Message doar Playerului
else if(get_pcvar_num(design) == 2)
{


}
//Full
else if(get_pcvar_num(design) == 3)
{
ColorChat(id, RED, " ^x01 Poza executata asupra lui ^x03 %s ^x01 de admin-ul ^x04 %s ^x01 (%s) ", name, adminname, timestamp)
ColorChat(player, RED, " ^x01 Poza executata asupra lui ^x03 %s ^x01 de admin-ul ^x04 %s ^x01 (%s) ", name, adminname, timestamp)
client_cmd(player, "snapshot") //ss


}
console_print(id, "%s 's ip-ul este %s!",name,ip)
console_print(id, "%s 's ip-ul este %s!",name,ip)
console_print(id, "%s 's ip-ul este %s!",name,ip)
finish = finish - 1;

if(finish == 0)
{


}

return PLUGIN_CONTINUE;
}

public show_ip(id)
{
console_print(id, "Ultimul IP este: %s!",ip)
}


public demo(id,level,cid){
if(!cmd_access(id,level,cid,1))
return 0;

new cmd[32], mapname[32], name[32], time[32], name2[32]
read_argv(1, cmd, 31);
new player = cmd_target(id, cmd, 5);

if (!player)
return 0;
get_time("%m/%d/%Y - %H:%M:%S",time,31)
get_user_name(player,name,31)
get_user_name(id,name2,31)
get_mapname(mapname,31)
client_cmd(player,"record %s_%s.dem",name,mapname)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai pornit demo-ul jucatorului: %s, Data: %s",name,time)
ColorChat(id, RED, "^x01 Ai pornit demo-ul jucatorului ^x03 %s. ^x01 Doar tu vezi acest mesaj.", name)
log_amx("%s Started The Demo On %s, Time %s",name, name2,time)
return 0;
}

public stopdemo(id,level,cid){
if(!cmd_access(id,level,cid,1))
return 0;

new cmd[32], name[32], time[32], name2[32]
read_argv(1, cmd, 31);
new player = cmd_target(id, cmd, 5);

if (!player)
return 0;
get_time("%m/%d/%Y - %H:%M:%S",time,31)
get_user_name(player,name,31)
get_user_name(id,name2,31)
client_cmd(player,"stop")
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
client_print(id,print_console,"Ai oprit demo-ul jucatorului: %s, Data: %s",name,time)
ColorChat(id, RED, "^x01 Ai oprit demo-ul jucatorului ^x03 %s. ^x01 Doar tu vezi acest mesaj.", name)
log_amx("%s Started The Demo On %s, Time %s",name, name2,time)
return 0;
}

public ClCmdSay( id )
{

static szArgs[ 192 ];
read_args( szArgs, sizeof ( szArgs ) -1 );

if( !szArgs[ 0 ] ) return PLUGIN_CONTINUE;

if( !g_bUsersCanChat )
{

}

return g_bUsersCanChat ? PLUGIN_CONTINUE : PLUGIN_HANDLED;
}

public setari(id)
{
adminId = id;
console_print(id, "Nume - IP - SteamID - INTERP");
console_print(id, " --------------------------------------------------------");

new players[32], num;
get_players(players, num);

for(new i = 0 ; i < num ; i++)
{

query_client_cvar(players[i], "ex_interp", "cvar_result_func")

}
console_print(id, "----------------------------------------------");
ColorChat(id, RED, "[!setari] ^x01 Deschide consola. Ordinea informatiilor: NUME-IP-STEAMID-INTERP.")

return 1;
}

public cvar_result_func(playerId, const cvar[], const value[]) {

new name[32];
new ipeki[32];
new authid[32];
get_user_name(playerId, name, 31)
get_user_ip(playerId, ipeki, 31, 1)
get_user_authid(playerId, authid, 31)

console_print(adminId, "%s - %s - %s - %s", name, ipeki, authid, value);
return PLUGIN_CONTINUE
}

public plugin_end( )
{
DestroyForward( iForward );
}

public client_connect( id )
{
g_iFrags[ id ] = 0;
}

public EventNewRound( )
{
arrayset( g_iFrags, 0, sizeof g_iFrags );
}

public EventDeathMsg( )
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );

CheckAce( iVictim );

if( !iKiller || iKiller == iVictim || cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
{
return PLUGIN_CONTINUE;
}

g_iFrags[ iKiller ]++;

return PLUGIN_CONTINUE;
}

public LogEventRoundEnd( )
{
new iPlayers[ 32 ], iNum, player;

get_players( iPlayers, iNum, "ch" );

for( new i = 0; i < iNum; i++ )
{
player = iPlayers[ i ];

if( g_iFrags[ player ] >= SEMI_ACE )
{
DidAceOrSemi( player );

if( g_iFrags[ player ] == SEMI_ACE + 1 )
{
return PLUGIN_CONTINUE;
}
}
}

return PLUGIN_CONTINUE;
}

public CheckAce( id )
{
if( g_iFrags[ id ] >= SEMI_ACE )
{
DidAceOrSemi( id );
}

g_iFrags[ id ] = 0;
}

public DidAceOrSemi( id )
{
new iReturn = PLUGIN_CONTINUE;

ExecuteForward( iForward, iReturn, id, g_iFrags[ id ] );

if( iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
{
return PLUGIN_HANDLED;
}

new szName[ 32 ];

get_user_name( id, szName, sizeof szName - 1 );

ColorChat( 0, GREEN, "%s^x03 %s^x01 a realizat un a%s ^x03%sACE! ^x01 Felicitari!",
TAG, szName, g_iFrags [ id ] == SEMI_ACE ? "" : "n", g_iFrags [ id ] == SEMI_ACE ? "SEMI-" : "" );

client_cmd( 0, "spk vox/buzwarn" );

return PLUGIN_HANDLED
}
public clcmd_money(client)
{
if (!get_pcvar_num(cvar_plugin_on))
{
client_print(client, print_chat, "[AMXX]: Show Teammate's Money was off.")
return PLUGIN_HANDLED
}
show_money(client)
return PLUGIN_CONTINUE
}

public player_spawn(client)
{
remove_task(client)
if (is_user_alive(client) && get_pcvar_num(cvar_plugin_on))
{
set_task(1.0, "show_money", client)
}
}

public show_money(client)
{
static message[1024];
static name[32];

new money, id, len;

len = format(message, charsmax(message), "Situatia financiara a coechipierilor:^n^n");
for (id = 1; id <= g_max_players; id++)
{
if (id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
{
money = cs_get_user_money(id);
get_user_name(id, name, 31);
len += format(message[len], charsmax(message) - len, "%-22.22s: %d^n", name, money);
}
}
set_hudmessage(18, 113, 255, 0.05, 0.35, 0, 0.02, 5.0, 0.1, 0.2, 2);
ShowSyncHudMsg(client, g_sync_creat_list, message);
}

public set_team(id)
g_teammate[id] = bool:(read_data(2) == 1);

public show_teammate_money(id)
{
if (!get_pcvar_num(cvar_plugin_on))
return PLUGIN_HANDLED
if(!is_user_bot(id) && is_user_connected(id) && get_pcvar_num(cvar_status_on))
{
static name[32]

new pid = read_data(2)
new red = 0, blue = 0

if (cs_get_user_team(pid) == CS_TEAM_T)
red = 255
else if(cs_get_user_team(pid) == CS_TEAM_CT)
blue = 255

get_user_name(pid, name, charsmax(name))
new money = cs_get_user_money(pid)
if (g_teammate[id])
{
set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8)
ShowSyncHudMsg(id, g_sync_creat_statustext, "Friend:%s -- Money:%d", name, money)
}
else {
set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 8)
ShowSyncHudMsg(id, g_sync_creat_statustext, "Enemy:%s", name)
}
}
return PLUGIN_CONTINUE
}

public client_disconnect2(client){

remove_task(client)
}


public cmdct(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);

if (!player)
{
return PLUGIN_HANDLED;
}

if (cs_get_user_team(player) == CS_TEAM_CT)
{
console_print(id, "Jucatorul este deja in echipa CT");
return PLUGIN_HANDLED;
}

new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);

if (is_user_alive (player) )
{
user_silentkill(player);
}

cs_set_user_team(player,CS_TEAM_CT);
log_amx("Admin %s: Task amx_ct/t %s",name, name2);
ColorChat(0, RED, "[/ct] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la CONTRA-TERORISTI -^x04%s", name2, name);

return PLUGIN_HANDLED;
}

public cmdt(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);

if (!player)
{
return PLUGIN_HANDLED;
}

if (cs_get_user_team(player) == CS_TEAM_T)
{
console_print(id, "Jucatorul este deja in echipa T");
return PLUGIN_HANDLED;
}

new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);

if (is_user_alive (player) )
{
user_silentkill(player);
}

cs_set_user_team(player,CS_TEAM_T);
log_amx("Admin %s: Task amx_t %s",name, name2);
ColorChat(0, RED, "[/t] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la TERORISTI -^x04%s", name2, name);

return PLUGIN_HANDLED;
}

public cmdspec(id, level, cid)
{
if (!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new player = cmd_target(id,arg,CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF);

if (!player)
{
return PLUGIN_HANDLED;
}

if (cs_get_user_team(player) == CS_TEAM_SPECTATOR)
{
console_print(id, "Jucatorul este deja in spectatori");
return PLUGIN_HANDLED;
}

new name[32], name2[32];
get_user_name(id,name,31);
get_user_name(player,name2, 31);

if (is_user_alive (player) )
{
user_silentkill(player);
}

cs_set_user_team(player,CS_TEAM_SPECTATOR);
log_amx("Admin %s: Task amx_spec %s",name, name2);
ColorChat(0, RED, "[/spec] ^x01Jucatorul ^x03 %s ^x01 a fost mutat la SPECTATORI -^x04%s", name2, name);

return PLUGIN_HANDLED;
}

public cmd_spec (id, level, cid) { /////////ASTA ESTE PROBLEMA PLUGIN-ULUI
//Verificam daca are acces la comanda
if(!cmd_access(id, level, cid, 2)) {
//Mesajul care ii apare
client_print(id,print_console,"Nu ai acces la aceasta comanda");
return PLUGIN_HANDLED;
}

new arg[32], cmd[32];
read_argv(0,cmd,31);
read_argv(1,arg,31);
new iPlayers[ 32 ], iNum, iPlayer
get_players( iPlayers, iNum )

for ( new a = 0; a < iNum; a++ )
{
iPlayer = iPlayers[ a ];

switch ( cs_get_user_team( iPlayer ) )

{
case CS_TEAM_T, CS_TEAM_CT:
{
if(is_user_alive( iPlayer ))
user_silentkill( iPlayer );
cs_set_user_team( iPlayer, CS_TEAM_SPECTATOR );
set_cvar_string ( "sv_restart", "5" );
}
}
}

ColorChat(0,RED,"[!specall] ^x01Jucatorii au fost transferati la spectatori pentru runda alegerilor. -^x04%s^x01 ", szName );
return 1;
}

public admin_slash(id)
{
new sArg[MAX_NAME_LENGTH+1]

read_argv(1,sArg,MAX_NAME_LENGTH)

if ( sArg[0] == '/' ) {

new sCommand[MAX_TEXT_LENGTH+1]
new sMessage[MAX_TEXT_LENGTH+1]

read_args(sMessage,MAX_TEXT_LENGTH)
remove_quotes(sMessage)
replace(sMessage,MAX_TEXT_LENGTH,"/","")



format(sCommand,MAX_TEXT_LENGTH,"amx_%s",sMessage)
client_cmd(id,sCommand)

}
return PLUGIN_CONTINUE
}

public plugin_end2() {
new minutes = floatround(get_gametime() / 60.0, floatround_ceil);

new map[32];
get_mapname(map, charsmax(map));

new f = fopen(gSaveFile, "wt");

fprintf(f, "^"%s^" %d", map, minutes);

if(gNumLastMaps == LAST_MAPS_SAVE) {
gNumLastMaps--;
}

for(new i = 0; i < gNumLastMaps; i++) {
fprintf(f, "^n^"%s^" %d", gLastMapName[i], gLastMapTime[i]);
}

fclose(f);
}

public CmdLastMaps(id) {
if(gNumLastMaps) {
new maps[192], len;
for(new i = 0; i < gNumLastMaps; i++) {
len += formatex(maps[len], charsmax(maps) - len, "%s%s (%dmin)", len ? ", " : "", gLastMapName[i], gLastMapTime[i]);
}

ColorChat(id, RED, "[!harti] ^x01 Ultimele 3 harti jucate: ^x04 %s", maps);
} else {
client_print(id, print_chat, "Nu este nicio harta anterioara.");
}
}

public pass(id, level, cid)
{
if(!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

new cmd[32], password[128]

read_argv(0, cmd, 31)
read_args(password, 127)
replace(password, 127, cmd, "")
format(password, 127, "%s", password)

get_user_name(id, name, 31)
get_user_authid(id, authid, 31)
switch (get_cvar_num("amx_show_activity")) {
case 2: ColorChat(0,RED,"[/pass] ^x01 Parola a fost setata pe server. Tasteaza /nopass pentru a o scoate. - ^x04 %s",name)
case 1: ColorChat(0,RED,"Este deja o parola pe server.")
}
log_amx("Cmd: ^"%s<%d><%s>^" set the server password to %s",name,get_user_userid(id),authid,password)
set_cvar_string("sv_password", password)

return PLUGIN_HANDLED
}

public nopass(id, level, cid)
{
if(!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

get_user_name(id, name, 31)
get_user_authid(id, authid, 31)
switch (get_cvar_num("amx_show_activity")) {
case 2: ColorChat(0,RED,"[/nopass]^x01 Parola a fost scoasa de pe server. - ^x04 %s",name)
case 1: client_print(0,print_chat,"A fost scoasa deja parola de pe server.")
}
log_amx("Cmd: ^"%s<%d><%s>^" removed server password", name,get_user_userid(id),authid)
set_cvar_string("sv_password", "")

return PLUGIN_HANDLED
}


+mutat in categoria corespunzatoare

_________________
METODA BOOST/DROP 2018 GRATUITA (pentru CS 1.6)
AMX XMAS Gifts 2.0 - Private Plugin
AMX Christmass Addons (2019)
[VAND] Addons Zombie v7.1 (Release 10 February 2018)[/center]


09 Feb 2019 14:43
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: SkillartzHD and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group