It is currently 19 Dec 2018 18:37



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
 Plugin sistem puncte 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 02 Aug 2015 14:12
Posts: 143
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Buna seara! As dori si eu un plugin de puncte in care sa aiba urmatoarele :

- pe kill sa-i dea la player-ul respectiv 1 punct
- pe hs sa-i dea 2 puncte
- kill cu lama sa-i dea 3 puncte
- cand tasteaza /puncte in chat sa-i arate punctele stranse si sa se salveze punctele
- uciderea unui coechipier (TK) - minus 5 puncte
- cand plant/defuse un player sa-i dea 3 puncte.


Last edited by JustiNNN on 03 Jul 2018 15:35, edited 1 time in total.



02 Jul 2018 21:33
Profile multumesc WWW
Super moderator
Super moderator
User avatar

Joined: 10 Jul 2013 20:26
Posts: 2124
Location: Constanta
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Super moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 0
pluginuri-extream/advanced-points-system-t225514.html - 99% din cerere rezolvata.


03 Jul 2018 10:13
Profile multumesc
Membru, skill +1
Membru, skill +1

Joined: 02 Aug 2015 14:12
Posts: 143
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
E bun , dar acest sistem il bag pe sv de mix si nu stiu cum sa activez pluginul de puncte cand dau /start atunci sa functioneze si sa se opreasca cand dau /stop...


11 Jul 2018 19:34
Profile multumesc WWW
Online
Moderator ajutator
Moderator ajutator
User avatar

Joined: 05 Jun 2016 22:04
Posts: 1155
Location: beyond the time
Detinator Steam: Da
Detinator server CS: GO/CSGO.WARED.RO
SteamID: DevilBoy_eXe
Reputatie: Moderator ajutator
Fond eXtream: 0
Posteaza sma de la pluginu de mix ca fara el nu poate sa iti faca nimeni nici o modificare
Inca o chestie, punctele alea sunt doar asa de forma ca un fel de scor per player sau mai fac si altceva in plus?

_________________


11 Jul 2018 20:48
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1

Joined: 02 Aug 2015 14:12
Posts: 143
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Am modificat eu un plugin de points si e ok numai ca problema asta o are ca nu se activeaza la /start si sa se opreasca la /stop atat sa mearga ...

| 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[ ] = "[MIX]"


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()
{
/// Setarile
register_clcmd("say .setari", "setari", ADMIN_KICK)
register_clcmd("say !setari", "setari", ADMIN_KICK)
register_clcmd("say /setari", "setari", ADMIN_KICK)
register_clcmd("say_team .setari", "setari", ADMIN_KICK)
register_clcmd("say_team !setari", "setari", ADMIN_KICK)
register_clcmd("say_team /setari", "setari", ADMIN_KICK)

/// cvar_result_func
register_clcmd "say .setari", "cvar_result_func", ADMIN_KICK

/// 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")

// Warm
register_clcmd("say !warm", "warm", ADMIN_KICK)
register_clcmd("say .warm", "warm", ADMIN_KICK)
register_clcmd("say /warm", "warm", ADMIN_KICK)
register_clcmd("say_team /warm", "warm", ADMIN_KICK)
register_clcmd("say_team !warm", "warm", ADMIN_KICK)
register_clcmd("say_team .warm", "warm", ADMIN_KICK)


/// PRELUNGIRI
register_clcmd("say !prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say .prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say /prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say .extra", "prelungiri", ADMIN_KICK)
register_clcmd("say /extra", "prelungiri", ADMIN_KICK)
register_clcmd("say !extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team /extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team !extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team .extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team !prelugniri", "prelungiri", ADMIN_KICK)
register_clcmd("say_team /prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say_team .prelungiri", "prelungiri", ADMIN_KICK)



/// RESTART
register_clcmd("say .rr", "restart", ADMIN_KICK)
register_clcmd("say /rr", "restart", ADMIN_KICK)
register_clcmd("say !rr", "restart", ADMIN_KICK)
register_clcmd("say /restart", "restart", ADMIN_KICK)
register_clcmd("say !restart", "restart", ADMIN_KICK)
register_clcmd("say .restart", "restart", ADMIN_KICK)
register_clcmd("say_team /rr", "restart", ADMIN_KICK)
register_clcmd("say_team !rr", "restart", ADMIN_KICK)
register_clcmd("say_team .rr", "restart", ADMIN_KICK)


/// KNIFE
register_clcmd("say /knife", "knife", ADMIN_KICK)
register_clcmd("say !knife", "knife", ADMIN_KICK)
register_clcmd("say .knife", "knife", ADMIN_KICK)
register_clcmd("say /cutite", "knife", ADMIN_KICK)
register_clcmd("say !cutite", "knife", ADMIN_KICK)
register_clcmd("say .cutite", "knife", ADMIN_KICK)
register_clcmd("say_team .knife", "knife", ADMIN_KICK)
register_clcmd("say_team /knfie", "knife", ADMIN_KICK)
register_clcmd("say_team !knife", "knife", ADMIN_KICK)
register_clcmd("say_team .cutite", "knife", ADMIN_KICK)
register_clcmd("say_team !cutite", "knife", ADMIN_KICK)
register_clcmd("say_team /cutite", "knife", ADMIN_KICK)


/// blocare
register_clcmd( "say .blocare", "ClCmdSayBlocare" );
register_clcmd( "say /off", "ClCmdSayBlocare" );
register_clcmd( "say /blocare", "ClCmdSayBlocare" );
register_clcmd( "say .deblocare", "ClCmdSayDeBlocare" );
register_clcmd( "say /on", "ClCmdSayDeBlocare" );
register_clcmd( "say !blocare", "ClCmdSayBlocare" );
register_clcmd( "say !deblocare", "ClCmdSayDeBlocare" );
register_clcmd( "say /deblocare", "ClCmdSayDeBlocare" );
register_clcmd( "say_team /on", "ClCmdSayDeBlocare" );
register_clcmd( "say_team !on", "ClCmdSayDeBlocare" );
register_clcmd( "say_team !off", "ClCmdSayDeBlocare" );
register_clcmd( "say_team /off", "ClCmdSayDeBlocare" );
register_clcmd( "say", "ClCmdSay" );

///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")


/// Hitbox
register_event("ResetHUD", "event_hud_reset", "be")
register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")
register_clcmd("fullupdate", "clcmd_fullupdate")
register_concmd("amx_hsonly", "admin_set_hitbox", ADMIN_KICK, "<0|a|b|c|d|e|f|g> - Set hitboxes. Letters equal the body part, can combine letters.")
hitbox_bit = register_cvar("hitbox_bit", "255")
amx_show_activity = get_cvar_pointer("amx_show_activity")



// 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)







/// STOP MIX
register_clcmd("say !stop", "stopmix", ADMIN_KICK)
register_clcmd("say .stop", "stopmix", ADMIN_KICK)
register_clcmd("say /stop", "stopmix", ADMIN_KICK)
register_clcmd("say !stopmix", "stopmix", ADMIN_KICK)
register_clcmd("say .stopmix", "stopmix", ADMIN_KICK)
register_clcmd("say /stopmix", "stopmix", ADMIN_KICK)
register_clcmd("say_team /stop", "stopmix", ADMIN_KICK)
register_clcmd("say_team !stop", "stopmix", ADMIN_KICK)
register_clcmd("say_team .stop", "stopmix", 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" );




// Score
register_clcmd("say !score", "scor", ADMIN_KICK)
register_clcmd("say .score", "scor", ADMIN_KICK)
register_clcmd("say /score", "scor", ADMIN_KICK)
register_clcmd("say_team !score", "scor", ADMIN_KICK)
register_clcmd("say_team .score", "scor", ADMIN_KICK)
register_clcmd("say_team /score", "scor", ADMIN_KICK)

/// 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")


/// comenzi
register_clcmd("say comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say !comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say /comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say_team /comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say_team !comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say_team .comenzi", "comenzi", ADMIN_KICK)



//// 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 );

//// TEAM MONEY


RegisterHam(Ham_Spawn, "player", "player_spawn", 1)

register_clcmd("say /money", "clcmd_money")
register_clcmd("say !money", "clcmd_money")
register_clcmd("say /bani", "clcmd_money")
register_clcmd("say !bani", "clcmd_money")

register_event("StatusValue", "show_teammate_money", "be", "1=2", "2!0")
register_event("StatusValue", "set_team", "be", "1=1")

cvar_plugin_on = register_cvar("stm_on", "1")
cvar_status_on = register_cvar("stm_st_on", "1")

g_max_players = get_maxplayers()
g_sync_creat_statustext = CreateHudSyncObj()
g_sync_creat_list = CreateHudSyncObj()

////////////Specall
register_concmd("amx_ct", "cmdct", ADMIN_SLAY, "NUME : Transfera jucatorul la echipa Counter/Terror");
register_concmd("amx_t", "cmdt", ADMIN_SLAY, "NUME : Transfera jucatorul la echipa Terror");
register_concmd("amx_spec", "cmdspec", ADMIN_SLAY, "NUME : Transfera jucatorul la Spectator");
register_clcmd("say .specall", "cmd_spec", ADMIN_KICK, "All players spec");
register_clcmd("say /specall", "cmd_spec", ADMIN_KICK, "All players spec");
register_clcmd("say !specall", "cmd_spec", ADMIN_KICK, "All players spec");



////// amx chat
register_clcmd("say","admin_slash",0,"say /command < params >")
register_clcmd("say_team","admin_slash",0,"say /command < params >")

/////PASS SI NOPASS
register_concmd("amx_pass", "pass", ADMIN_BAN, "- Sets a server password")
register_concmd("amx_password", "pass", ADMIN_BAN, "- Sets a server password")
register_concmd("amx_parola", "pass", ADMIN_BAN, "- Sets a server password")
register_concmd("amx_nopass", "nopass", ADMIN_BAN, "- Removes the server password")
register_concmd("amx_removepassword", "nopass", ADMIN_BAN, "- Removes the server password")



/////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 warm(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", "2" );
set_cvar_string ( "mp_freezetime", "0" );
set_cvar_string ( "mp_startmoney", "16000" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "amx_atsrounds", "100" );


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


get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!warm]^x01Rundele de incalzire au fost pornite. -^x04%s^x01 ", szName );






}
return PLUGIN_HANDLED
}

public stopmix(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", "1" );
set_cvar_string ( "mp_freezetime", "0" );
set_cvar_string ( "mp_startmoney", "16000" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "amx_atsrounds", "100" );


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

get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!stop]^x01 Mix-ul a fost oprit. -^x04%s^x01", szName );






}
return PLUGIN_HANDLED
}

public prelungiri(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", "8" );
set_cvar_string ( "mp_startmoney", "10000" );
set_cvar_string ( "mp_friendlyfire", "1" );
set_cvar_string ( "amx_atsrounds", "3" );


mixon = 1;
if (schimbate == 0)
{
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, "[!prelungiri]^x01 Prelungirile vor porni in 5 secunde. -^x04%s^x01 ", szName );
}
return PLUGIN_HANDLED
}




public restart( id ){

if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Tasteaza !comenzi in chat pentru mai multe informatii!")

roundnumber = 0;
return PLUGIN_HANDLED
}
else {
set_cvar_string ( "sv_restart", "1" );
mixon = 1;
if (schimbate == 1)
{
teamA = teamA1
teamB = teamB1
roundnumber = 0
} else {
schimbate = 0;
teamA = 0
teamB = 0
teamA1 = 0
teamB1= 0
roundnumber = 0
}

}
return PLUGIN_HANDLED
}

public knife(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", "2" );
set_cvar_string ( "mp_freezetime", "0" );
set_cvar_string ( "mp_startmoney", "16000" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "amx_atsrounds", "100" );


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

get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!knife]^x01 Rundele de cutite au fost pornite. -^x04%s^x01 ", szName );






}
return PLUGIN_HANDLED
}

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", "9" );
set_cvar_string ( "mp_startmoney", "800" );
set_cvar_string ( "mp_friendlyfire", "1" );
set_cvar_string ( "mp_roundtime", "1.75" );
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 ClCmdSayBlocare( id )
{
if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
return PLUGIN_HANDLED;
}

if( !g_bUsersCanChat )
{
client_print(id, print_chat, "Chat-ul a fost deja blocat.")
return PLUGIN_HANDLED;
}

new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );

ColorChat(0, RED, "[!blocare] ^x01 Chat-ul a fost blocat. -^x04%s^x01", szName );

g_bUsersCanChat = false;

return PLUGIN_CONTINUE;
}

public ClCmdSayDeBlocare( id )
{
if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
return PLUGIN_HANDLED;
}

if( g_bUsersCanChat )
{
client_print(0, print_chat, "Chat-ul este deja deblocat.")
return PLUGIN_HANDLED;
}

new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );

ColorChat(0, RED, "[!deblocare] ^x01 Chat-ul a fost deblocat. -^x04%s^x01", szName );
g_bUsersCanChat = true;
return PLUGIN_CONTINUE;
}

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 comenzi(id)
{
ColorChat(id, RED, "[!comenzi] ^x01 Deschide consola pentru a vedea comenzile pentru administrare.");
console_print(id, "Comenzile de consola ale server-ului:");
console_print(id, "-----------------------------------------------");
console_print(id, "amx_hsonly a (pentru a seta server-ul pe HEADSHOT ONLY)")
console_print(id, "amx_hsonly abcdefgh (pentru a seta server-ul pe clasic)")
console_print(id, "amx_ss OLD 1 (face poze jucatorului OLD , de la 1 la 5)")
console_print(id, "amx_demo OLD! (porneste demo jucatorului, fara ca el sa stie)")
console_print(id, "amx_stopdemo OLD! (opreste demo-ul jucatorului")
console_print(id, "demo (jucatorul primeste demo, chiar daca in consola scrie ca nu exista comanda)")
console_print(id, "amx_stopdemo OLD! (opreste demo-ul jucatorului)")
console_print(id, "amx_spec OLD (transfera jucatorul la spectaotri)")
console_print(id, "amx_t OLD (transfera jucatorul la teroristi)")
console_print(id, "amx_ct OLD (transfera jucatorul la contrateroristi)")
console_print(id, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
console_print(id, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
console_print(id, "Mai sus vei gasi comenzile cu prefixul amx_")
console_print(id, "Comenzile publice ale server-ului:");
console_print(id, "URMATOARELE COMENZI MERG SCRISE CU / . !");
console_print(id, "EX: !start /start .start");
console_print(id, "---------------------------------------------");
console_print(id, "/specall - transfera jucatorii la spectatori ");
console_print(id, "/live - pentru pornirea mix-ului ");
console_print(id, "/stop - pentru oprirea mix-ului ");
console_print(id, "/warm - pentru pornirea rundelor de incalzire");
console_print(id, "/knife - pentru pornirea rundelor de cutite");
console_print(id, "/money - pentru situatia financiara");
console_print(id, "/setari- pentru afisarea interp-ului,steamid-ului si ip-ului");
console_print(id, "/interp - pentru setarea interp-ului");
console_print(id, "/score - pentru afisarea scorului" );
console_print(id, "/blocare sau /off - pentru blocarea chat-ului" );
console_print(id, "/deblocare sau /on - pentru deblocarea chat-ului")
console_print(id, "/prleungiri pentru rundele de prelungire (scor 15-15)")
console_print(id, "/map - pentru schimbarea hartii (/map de_dust2)" );
console_print(id, "TOATE COMENZILE AMX SE POT FOLOSI DIRECT DE PE CHAT! EX: /ban old 0 wall")






}


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
}


11 Jul 2018 21:13
Profile multumesc WWW
Fost moderator
Fost moderator
User avatar

Joined: 08 Nov 2013 20:43
Posts: 3423
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Si pluginul de puncte?

_________________
Contact:

Activitate scazuta.


16 Jul 2018 20:12
Profile multumesc WWW
Membru, skill +1
Membru, skill +1

Joined: 02 Aug 2015 14:12
Posts: 143
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Ti l-am lasat in PM.


16 Jul 2018 21:11
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 30 Sep 2017 21:12
Posts: 52
Location: Resita
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
JustiNNN wrote:
Am modificat eu un plugin de points si e ok numai ca problema asta o are ca nu se activeaza la /start si sa se opreasca la /stop atat sa mearga ...

| 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[ ] = "[MIX]"


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()
{
/// Setarile
register_clcmd("say .setari", "setari", ADMIN_KICK)
register_clcmd("say !setari", "setari", ADMIN_KICK)
register_clcmd("say /setari", "setari", ADMIN_KICK)
register_clcmd("say_team .setari", "setari", ADMIN_KICK)
register_clcmd("say_team !setari", "setari", ADMIN_KICK)
register_clcmd("say_team /setari", "setari", ADMIN_KICK)

/// cvar_result_func
register_clcmd "say .setari", "cvar_result_func", ADMIN_KICK

/// 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")

// Warm
register_clcmd("say !warm", "warm", ADMIN_KICK)
register_clcmd("say .warm", "warm", ADMIN_KICK)
register_clcmd("say /warm", "warm", ADMIN_KICK)
register_clcmd("say_team /warm", "warm", ADMIN_KICK)
register_clcmd("say_team !warm", "warm", ADMIN_KICK)
register_clcmd("say_team .warm", "warm", ADMIN_KICK)


/// PRELUNGIRI
register_clcmd("say !prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say .prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say /prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say .extra", "prelungiri", ADMIN_KICK)
register_clcmd("say /extra", "prelungiri", ADMIN_KICK)
register_clcmd("say !extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team /extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team !extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team .extra", "prelungiri", ADMIN_KICK)
register_clcmd("say_team !prelugniri", "prelungiri", ADMIN_KICK)
register_clcmd("say_team /prelungiri", "prelungiri", ADMIN_KICK)
register_clcmd("say_team .prelungiri", "prelungiri", ADMIN_KICK)



/// RESTART
register_clcmd("say .rr", "restart", ADMIN_KICK)
register_clcmd("say /rr", "restart", ADMIN_KICK)
register_clcmd("say !rr", "restart", ADMIN_KICK)
register_clcmd("say /restart", "restart", ADMIN_KICK)
register_clcmd("say !restart", "restart", ADMIN_KICK)
register_clcmd("say .restart", "restart", ADMIN_KICK)
register_clcmd("say_team /rr", "restart", ADMIN_KICK)
register_clcmd("say_team !rr", "restart", ADMIN_KICK)
register_clcmd("say_team .rr", "restart", ADMIN_KICK)


/// KNIFE
register_clcmd("say /knife", "knife", ADMIN_KICK)
register_clcmd("say !knife", "knife", ADMIN_KICK)
register_clcmd("say .knife", "knife", ADMIN_KICK)
register_clcmd("say /cutite", "knife", ADMIN_KICK)
register_clcmd("say !cutite", "knife", ADMIN_KICK)
register_clcmd("say .cutite", "knife", ADMIN_KICK)
register_clcmd("say_team .knife", "knife", ADMIN_KICK)
register_clcmd("say_team /knfie", "knife", ADMIN_KICK)
register_clcmd("say_team !knife", "knife", ADMIN_KICK)
register_clcmd("say_team .cutite", "knife", ADMIN_KICK)
register_clcmd("say_team !cutite", "knife", ADMIN_KICK)
register_clcmd("say_team /cutite", "knife", ADMIN_KICK)


/// blocare
register_clcmd( "say .blocare", "ClCmdSayBlocare" );
register_clcmd( "say /off", "ClCmdSayBlocare" );
register_clcmd( "say /blocare", "ClCmdSayBlocare" );
register_clcmd( "say .deblocare", "ClCmdSayDeBlocare" );
register_clcmd( "say /on", "ClCmdSayDeBlocare" );
register_clcmd( "say !blocare", "ClCmdSayBlocare" );
register_clcmd( "say !deblocare", "ClCmdSayDeBlocare" );
register_clcmd( "say /deblocare", "ClCmdSayDeBlocare" );
register_clcmd( "say_team /on", "ClCmdSayDeBlocare" );
register_clcmd( "say_team !on", "ClCmdSayDeBlocare" );
register_clcmd( "say_team !off", "ClCmdSayDeBlocare" );
register_clcmd( "say_team /off", "ClCmdSayDeBlocare" );
register_clcmd( "say", "ClCmdSay" );

///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")


/// Hitbox
register_event("ResetHUD", "event_hud_reset", "be")
register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")
register_clcmd("fullupdate", "clcmd_fullupdate")
register_concmd("amx_hsonly", "admin_set_hitbox", ADMIN_KICK, "<0|a|b|c|d|e|f|g> - Set hitboxes. Letters equal the body part, can combine letters.")
hitbox_bit = register_cvar("hitbox_bit", "255")
amx_show_activity = get_cvar_pointer("amx_show_activity")



// 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)







/// STOP MIX
register_clcmd("say !stop", "stopmix", ADMIN_KICK)
register_clcmd("say .stop", "stopmix", ADMIN_KICK)
register_clcmd("say /stop", "stopmix", ADMIN_KICK)
register_clcmd("say !stopmix", "stopmix", ADMIN_KICK)
register_clcmd("say .stopmix", "stopmix", ADMIN_KICK)
register_clcmd("say /stopmix", "stopmix", ADMIN_KICK)
register_clcmd("say_team /stop", "stopmix", ADMIN_KICK)
register_clcmd("say_team !stop", "stopmix", ADMIN_KICK)
register_clcmd("say_team .stop", "stopmix", 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" );




// Score
register_clcmd("say !score", "scor", ADMIN_KICK)
register_clcmd("say .score", "scor", ADMIN_KICK)
register_clcmd("say /score", "scor", ADMIN_KICK)
register_clcmd("say_team !score", "scor", ADMIN_KICK)
register_clcmd("say_team .score", "scor", ADMIN_KICK)
register_clcmd("say_team /score", "scor", ADMIN_KICK)

/// 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")


/// comenzi
register_clcmd("say comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say !comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say /comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say_team /comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say_team !comenzi", "comenzi", ADMIN_KICK)
register_clcmd("say_team .comenzi", "comenzi", ADMIN_KICK)



//// 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 );

//// TEAM MONEY


RegisterHam(Ham_Spawn, "player", "player_spawn", 1)

register_clcmd("say /money", "clcmd_money")
register_clcmd("say !money", "clcmd_money")
register_clcmd("say /bani", "clcmd_money")
register_clcmd("say !bani", "clcmd_money")

register_event("StatusValue", "show_teammate_money", "be", "1=2", "2!0")
register_event("StatusValue", "set_team", "be", "1=1")

cvar_plugin_on = register_cvar("stm_on", "1")
cvar_status_on = register_cvar("stm_st_on", "1")

g_max_players = get_maxplayers()
g_sync_creat_statustext = CreateHudSyncObj()
g_sync_creat_list = CreateHudSyncObj()

////////////Specall
register_concmd("amx_ct", "cmdct", ADMIN_SLAY, "NUME : Transfera jucatorul la echipa Counter/Terror");
register_concmd("amx_t", "cmdt", ADMIN_SLAY, "NUME : Transfera jucatorul la echipa Terror");
register_concmd("amx_spec", "cmdspec", ADMIN_SLAY, "NUME : Transfera jucatorul la Spectator");
register_clcmd("say .specall", "cmd_spec", ADMIN_KICK, "All players spec");
register_clcmd("say /specall", "cmd_spec", ADMIN_KICK, "All players spec");
register_clcmd("say !specall", "cmd_spec", ADMIN_KICK, "All players spec");



////// amx chat
register_clcmd("say","admin_slash",0,"say /command < params >")
register_clcmd("say_team","admin_slash",0,"say /command < params >")

/////PASS SI NOPASS
register_concmd("amx_pass", "pass", ADMIN_BAN, "- Sets a server password")
register_concmd("amx_password", "pass", ADMIN_BAN, "- Sets a server password")
register_concmd("amx_parola", "pass", ADMIN_BAN, "- Sets a server password")
register_concmd("amx_nopass", "nopass", ADMIN_BAN, "- Removes the server password")
register_concmd("amx_removepassword", "nopass", ADMIN_BAN, "- Removes the server password")



/////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 warm(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", "2" );
set_cvar_string ( "mp_freezetime", "0" );
set_cvar_string ( "mp_startmoney", "16000" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "amx_atsrounds", "100" );


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


get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!warm]^x01Rundele de incalzire au fost pornite. -^x04%s^x01 ", szName );






}
return PLUGIN_HANDLED
}

public stopmix(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", "1" );
set_cvar_string ( "mp_freezetime", "0" );
set_cvar_string ( "mp_startmoney", "16000" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "amx_atsrounds", "100" );


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

get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!stop]^x01 Mix-ul a fost oprit. -^x04%s^x01", szName );






}
return PLUGIN_HANDLED
}

public prelungiri(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", "8" );
set_cvar_string ( "mp_startmoney", "10000" );
set_cvar_string ( "mp_friendlyfire", "1" );
set_cvar_string ( "amx_atsrounds", "3" );


mixon = 1;
if (schimbate == 0)
{
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, "[!prelungiri]^x01 Prelungirile vor porni in 5 secunde. -^x04%s^x01 ", szName );
}
return PLUGIN_HANDLED
}




public restart( id ){

if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Tasteaza !comenzi in chat pentru mai multe informatii!")

roundnumber = 0;
return PLUGIN_HANDLED
}
else {
set_cvar_string ( "sv_restart", "1" );
mixon = 1;
if (schimbate == 1)
{
teamA = teamA1
teamB = teamB1
roundnumber = 0
} else {
schimbate = 0;
teamA = 0
teamB = 0
teamA1 = 0
teamB1= 0
roundnumber = 0
}

}
return PLUGIN_HANDLED
}

public knife(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", "2" );
set_cvar_string ( "mp_freezetime", "0" );
set_cvar_string ( "mp_startmoney", "16000" );
set_cvar_string ( "mp_friendlyfire", "0" );
set_cvar_string ( "amx_atsrounds", "100" );


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

get_user_name( id, szName, sizeof ( szName ) -1 );
ColorChat(0, RED, "[!knife]^x01 Rundele de cutite au fost pornite. -^x04%s^x01 ", szName );






}
return PLUGIN_HANDLED
}

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", "9" );
set_cvar_string ( "mp_startmoney", "800" );
set_cvar_string ( "mp_friendlyfire", "1" );
set_cvar_string ( "mp_roundtime", "1.75" );
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 ClCmdSayBlocare( id )
{
if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
return PLUGIN_HANDLED;
}

if( !g_bUsersCanChat )
{
client_print(id, print_chat, "Chat-ul a fost deja blocat.")
return PLUGIN_HANDLED;
}

new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );

ColorChat(0, RED, "[!blocare] ^x01 Chat-ul a fost blocat. -^x04%s^x01", szName );

g_bUsersCanChat = false;

return PLUGIN_CONTINUE;
}

public ClCmdSayDeBlocare( id )
{
if(!is_user_admin(id) && ADMIN_KICK)
{
client_print(id, print_chat, "Ai nevoie de admin pentru aceasta comanda.")
return PLUGIN_HANDLED;
}

if( g_bUsersCanChat )
{
client_print(0, print_chat, "Chat-ul este deja deblocat.")
return PLUGIN_HANDLED;
}

new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );

ColorChat(0, RED, "[!deblocare] ^x01 Chat-ul a fost deblocat. -^x04%s^x01", szName );
g_bUsersCanChat = true;
return PLUGIN_CONTINUE;
}

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 comenzi(id)
{
ColorChat(id, RED, "[!comenzi] ^x01 Deschide consola pentru a vedea comenzile pentru administrare.");
console_print(id, "Comenzile de consola ale server-ului:");
console_print(id, "-----------------------------------------------");
console_print(id, "amx_hsonly a (pentru a seta server-ul pe HEADSHOT ONLY)")
console_print(id, "amx_hsonly abcdefgh (pentru a seta server-ul pe clasic)")
console_print(id, "amx_ss OLD 1 (face poze jucatorului OLD , de la 1 la 5)")
console_print(id, "amx_demo OLD! (porneste demo jucatorului, fara ca el sa stie)")
console_print(id, "amx_stopdemo OLD! (opreste demo-ul jucatorului")
console_print(id, "demo (jucatorul primeste demo, chiar daca in consola scrie ca nu exista comanda)")
console_print(id, "amx_stopdemo OLD! (opreste demo-ul jucatorului)")
console_print(id, "amx_spec OLD (transfera jucatorul la spectaotri)")
console_print(id, "amx_t OLD (transfera jucatorul la teroristi)")
console_print(id, "amx_ct OLD (transfera jucatorul la contrateroristi)")
console_print(id, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
console_print(id, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
console_print(id, "Mai sus vei gasi comenzile cu prefixul amx_")
console_print(id, "Comenzile publice ale server-ului:");
console_print(id, "URMATOARELE COMENZI MERG SCRISE CU / . !");
console_print(id, "EX: !start /start .start");
console_print(id, "---------------------------------------------");
console_print(id, "/specall - transfera jucatorii la spectatori ");
console_print(id, "/live - pentru pornirea mix-ului ");
console_print(id, "/stop - pentru oprirea mix-ului ");
console_print(id, "/warm - pentru pornirea rundelor de incalzire");
console_print(id, "/knife - pentru pornirea rundelor de cutite");
console_print(id, "/money - pentru situatia financiara");
console_print(id, "/setari- pentru afisarea interp-ului,steamid-ului si ip-ului");
console_print(id, "/interp - pentru setarea interp-ului");
console_print(id, "/score - pentru afisarea scorului" );
console_print(id, "/blocare sau /off - pentru blocarea chat-ului" );
console_print(id, "/deblocare sau /on - pentru deblocarea chat-ului")
console_print(id, "/prleungiri pentru rundele de prelungire (scor 15-15)")
console_print(id, "/map - pentru schimbarea hartii (/map de_dust2)" );
console_print(id, "TOATE COMENZILE AMX SE POT FOLOSI DIRECT DE PE CHAT! EX: /ban old 0 wall")






}


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
}


Pai si ce vrei tu mai exact? Cand dai /start sa meraga faza cu puncte si cand dai /stop sa nu mai se puna?
Dar daca nu faci nimic cu punctele nu vad la ce iti trebuie... Daca vrei sa faci ceva salveazale cu baza de date mysql si poate faci ceva shop pe site.


23 Jul 2018 21:15
Profile multumesc WWW
Membru, skill +1
Membru, skill +1

Joined: 02 Aug 2015 14:12
Posts: 143
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Pai am sistemul pe baza de date cu tot cu index , doar problema asta cand dau /start sa se activeze pluginul de points si la comanda /stop sa se opreasca ( folosesc pentru mix uri)


23 Jul 2018 22:26
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 30 Sep 2017 21:12
Posts: 52
Location: Resita
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Pai ori faci un public special pentru puncte si testezi daca e mixu on sau faci systemu direct in publicul de la comanda /start si atunci cand dai /stop nu se vor pune puncte si etc.


23 Jul 2018 22:58
Profile multumesc WWW
Membru, skill +1
Membru, skill +1

Joined: 02 Aug 2015 14:12
Posts: 143
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Eu cred ca mai bine facem un public in pluginul de mix si daca nu merge incercam metoda 2 prin comanda.


24 Jul 2018 09:08
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 30 Sep 2017 21:12
Posts: 52
Location: Resita
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Da exact, vad ca folosesti ultimate menu mix parca ii zicea.

| Afiseaza codul
public PointsSystem()
{
if(mixon == 1)
{
// aici nu setezi nimic
}
else
{
// aici iti faci systemu
}
}


24 Jul 2018 10:52
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: Aneimar, COLBYLICIOUS, KeNzY213, L1oN98, RealAlexanderTr and 92 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