[AMXX] Pluginuri des cautate [ Actualizat 18.09.2018 ]
Posted: 21 Sep 2008, 06:29
by aNNakin
1. Parasuta fara Model
===================
Descriere: Acesta este pluginul de parasuta fara model.
Download:
2. Plugin /chat
================
Descriere: Acest plugin blocheaza chat-ul.
Descarcare:
3. Ad Manager
Descriere: Acent plugin preia mesaje dintr-un fisier si le printeaza in chat.
Descarcare:
4. AMX WHO
==============
Descriere: Acest plugin afiseaza adminii online.
Download:
5. FAKE BOT
==============
Descriere: Acest plugin adauga 3 boti spec.
Descarcare:
6. Plugin: FREE VIP EVENT
====================
Descriere: Oferă beneficii VIP tuturor jucătorilor între anumite ore
Descărcare:
Link oficial plugin: Link eXtreamCS.Com
7. Plugin: FURIEN WALLHANG
Descriere: Jucătorii din echipa Terorist(FURIEN) poate merge pe ”pereți” fără vreun script anume, în același timp poate și ataca
Descărcare:
8. Plugin: Team Swap
====================
Descriere: Schimbă echipele între ele după 15 runde. De asemenea se poate modifica din sursă numărul rundelor.
Descărcare:
===================
Descriere: Acesta este pluginul de parasuta fara model.
Download:
- parachute.sma | Afiseaza codul
#include <amxmodx> #include <engine> public client_PreThink(id) { if(!is_user_alive(id)) return new Float:fallspeed = 100.0 * -1.0 new button = get_user_button(id) if(button & IN_USE) { new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) if (velocity[2] < 0.0) { entity_set_int(id, EV_INT_sequence, 3) entity_set_int(id, EV_INT_gaitsequence, 1) entity_set_float(id, EV_FL_frame, 1.0) entity_set_float(id, EV_FL_framerate, 1.0) velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed entity_set_vector(id, EV_VEC_velocity, velocity) } } }
2. Plugin /chat
================
Descriere: Acest plugin blocheaza chat-ul.
Descarcare:
- chat.sma | Afiseaza codul
#include <amxmodx> static const PLUGIN[] = "/chat", VERSION[] = "1.0", AUTHOR[] = "scosmyn"; new bool:bChat[33] = false public plugin_init() { register_plugin(PLUGIN,VERSION,AUTHOR) register_clcmd("say /chat","cmdChat") register_clcmd("say","cmdSay") register_clcmd("say_team","cmdSay") } public cmdSay(id) { if(!bChat[id]) { color(id,"!g[Zombie OutStanding] !teamTasteaza !g/chat !teampentru a putea scrie.") return 1 } return 0 } public cmdChat(id) { if(bChat[id]) return 1 bChat[id] = true color(id,"!g[Zombie OutStanding] !teamChat-ul a fost deblocat cu succes.") return 0 } public client_putinserver(id) { bChat[id] = false set_task(2.0,"task_exec",id) } public task_exec(id) { if(is_user_connected(id)) color(id,"!g[Zombie OutStanding] !teamPentru a debloca chat-ul scrie !g/chat") } stock color( const id, const input[ ], any:... ) { new count = 1, players[ 32 ] static msg[ 191 ] vformat( msg, 190, input, 3 ) replace_all( msg, 190, "!g", "^4" ) //- verde replace_all( msg, 190, "!y", "^1" ) //- galben replace_all( msg, 190, "!team", "^3" ) //- echipa replace_all( msg, 190, "!n", "^0" ) //- normal if( id ) players[ 0 ] = id; else get_players( players, count, "ch" ) { for( new i = 0; i < count; i++ ) { if( is_user_connected( players[ i ] ) ) { message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] ) write_byte( players[ i ] ); write_string( msg ); message_end( ); } } } }
3. Ad Manager
Descriere: Acent plugin preia mesaje dintr-un fisier si le printeaza in chat.
Descarcare:
- ad_manager.sma | Afiseaza codul
#include <amxmodx> #include <amxmisc> #pragma semicolon 1 new const PLUGIN[] = "Autoresponder/Advertiser"; new const VERSION[] = "0.5"; new const AUTHOR[] = "MaximusBrood"; #define NORM_AD 0 #define SAY_AD 1 #define COND 0 #define STORE 1 #define COND_TKN '%' #define SAY_TKN '@' #define COND_STKN "%" #define DEVIDE_STKN "~" #define SAY_STKN "@" #define MAXADS 64 new const Float:RAND_MIN = 60.0; new const Float:RAND_MAX = 80.0; new sayConditions[MAXADS][3][32]; new normConditions[MAXADS][3][32]; new normStore[MAXADS][128]; new sayStore[MAXADS][2][128]; new gmsgSayText; new adCount[2] = {0, 0}; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_cvar("admanager_version", "0.5", FCVAR_SERVER); register_cvar("ad_react_all", "1"); gmsgSayText = get_user_msgid("SayText"); register_clcmd("say","eventSay"); register_clcmd("say_team","eventSay"); set_task(10.0, "load"); } public load() { new filepath[64]; get_configsdir(filepath, 63); format(filepath, 63, "%s/advertisements.ini", filepath); if(file_exists(filepath)) { new output[512], conditions[128], temp[64], type; new fHandle = fopen(filepath, "rt"); if(!fHandle) return; for(new a = 0; a < MAXADS && !feof(fHandle); a++) { fgets(fHandle, output, 511); if(output[0] == ';' || !output[0] || output[0] == ' ' || output[0] == 10) { a--; continue; } type = 0; if(output[0] == COND_TKN) { split(output, conditions, 127, output, 511, DEVIDE_STKN); type = output[0] == SAY_TKN ? 1 : 0; for(new b = 0; b < 3; b++) { new sort[16], cond[32], numb; conditions[0] = ' '; trim(conditions); split(conditions, temp, 64, conditions, 127, COND_STKN); split(temp, sort, 15, cond, 31, " "); if(equali(sort, "map")) { numb = 0; } else if(equali(sort, "min_players")) { numb = 1; } else if(equali(sort, "max_players")) { numb = 2; } else { continue; } setString(COND, type, cond, adCount[type], numb); if(!conditions[0]) break; } } if(type == 0) type = output[0] == SAY_TKN ? 1 : 0; if(type == SAY_AD) { new said[32], answer[128]; output[0] = ' '; trim(output); split(output, said, 31, answer, 127, DEVIDE_STKN); setColor(answer, 127); setString(STORE, SAY_AD, said, adCount[SAY_AD], 0); setString(STORE, SAY_AD, answer, adCount[SAY_AD], 1); } else//if(type == NORM_AD) { //Apply color setColor(output, 511); //Save it setString(STORE, NORM_AD, output, adCount[NORM_AD]); } //Increment the right counter adCount[NORM_AD] += type == NORM_AD ? 1 : 0; adCount[SAY_AD] += type == SAY_AD ? 1 : 0; } //Set a first task, if there are any normal ads if(adCount[NORM_AD] != 0) set_task(random_float(RAND_MIN, RAND_MAX), "eventTask"); //Close file to prevent lockup fclose(fHandle); } } new currAd = -1; public eventTask() { //Go past all ads and check conditions for(new a = 0; a < adCount[NORM_AD]; a++) { //Put current ad to the next one currAd = currAd == adCount[NORM_AD] - 1 ? 0 : currAd + 1; if(checkConditions(currAd, NORM_AD)) { //Display the ad new data[3]; data[0] = currAd; data[1] = NORM_AD; data[2] = 0; displayAd(data); break; } } //Set a new task set_task(random_float(RAND_MIN, RAND_MAX), "eventTask"); return PLUGIN_CONTINUE; } public eventSay(id) { //If nothing is said, don't check if(adCount[SAY_AD] == 0) return PLUGIN_CONTINUE; new talk[64], keyword[16]; read_args(talk, 63) ; //En nu rennen voor jullie zakgeld klootzjakken! for(new a = 0; a < adCount[SAY_AD]; a++) { //Get the string getString(STORE, SAY_AD, keyword, 15, a, 0); if(containi(talk, keyword) != -1) { //Check the rest if it fails to conditions if(!checkConditions(a, SAY_AD)) continue; new data[3]; data[0] = a; data[1] = SAY_AD; data[2] = id; //Set the task set_task(0.3, "displayAd", 0, data, 3); //Don't execute more of them break; } } return PLUGIN_CONTINUE; } public displayAd(params[]) { //Get the string that is going to be displayed new message[128]; getString(STORE, params[1], message, 127, params[0], params[1]); //If its enabled by cvar and id is set, display to person who triggered message only if(get_cvar_num("ad_react_all") == 0 && params[2] != 0) { message_begin(MSG_ONE, gmsgSayText, {0,0,0}, params[2]); write_byte(params[2]); write_string(message); message_end(); } else { //Display the message to everyone new plist[32], playernum, player; get_players(plist, playernum, "c"); for(new i = 0; i < playernum; i++) { player = plist; message_begin(MSG_ONE, gmsgSayText, {0,0,0}, player); write_byte(player); write_string(message); message_end(); } } return PLUGIN_HANDLED; } //--------------------------------------------------------------------------- // STOCKS //--------------------------------------------------------------------------- stock checkConditions(a, type) { //Mapname if((type == NORM_AD && normConditions[a][0][0]) || (type == SAY_AD && sayConditions[a][0][0])) { new mapname[32]; get_mapname(mapname, 31); if(! (type == NORM_AD && equali(mapname, normConditions[a][0]) ) || (type == SAY_AD && equali(mapname, sayConditions[a][0]) ) ) return false; } //Min Players if((type == NORM_AD && normConditions[a][1][0]) || (type == SAY_AD && sayConditions[a][1][0])) { new playersnum = get_playersnum(); if( (type == NORM_AD && playersnum < str_to_num(normConditions[a][1]) ) || (type == SAY_AD && playersnum < str_to_num(sayConditions[a][1]) ) ) return false; } //Max Players if((type == NORM_AD && normConditions[a][2][0]) || (type == SAY_AD && sayConditions[a][2][0])) { new playersnum = get_playersnum(); if( (type == NORM_AD && playersnum > str_to_num(normConditions[a][2]) ) || (type == SAY_AD && playersnum > str_to_num(sayConditions[a][2]) ) ) return false; } //If everything went fine, return true return true; } stock setColor(string[], len) { if (contain(string, "!t") != -1 || contain(string, "!g") != -1 || contain(string,"!n") != -1) { //Some nice shiny colors ^^ replace_all(string, len, "!t", "^x03"); replace_all(string, len, "!n", "^x01"); replace_all(string, len, "!g", "^x04"); //Work away a stupid bug format(string, len, "^x01%s", string); } } stock getString(mode, type, string[], len, one, two = 0) { //server_print("mode: %d type: %d len: %d one: %d two %d", mode, type, len, one, two); //Uses the fact that a string is passed by reference if(mode == COND) { if(type == NORM_AD) { copy(string, len, normConditions[one][two]); } else//if(type = SAY_AD) { copy(string, len, sayConditions[one][two]); } } else//if(mode == STORE) { if(type == NORM_AD) { copy(string, len, normStore[one]); } else//if(type == SAY_AD) { copy(string, len, sayStore[one][two]); } } } stock setString(mode, type, string[], one, two = 0) { if(mode == COND) { if(type == NORM_AD) { copy(normConditions[one][two], 31, string); } else//if(type = SAY_AD) { copy(sayConditions[one][two], 31, string); } } else//if(mode == STORE) { if(type == NORM_AD) { copy(normStore[one], 127, string); } else//if(type == SAY_AD) { copy(sayStore[one][two], 127, string); } } }
4. AMX WHO
==============
Descriere: Acest plugin afiseaza adminii online.
Download:
- amx_who.sma | Afiseaza codul
#include <amxmodx> #include <amxmisc> #define PLUGIN "Who meniu" #define VERSION "1.0" #define AUTHOR "Askwrite" // Modificat de SnowFake #define GRUPURI 6 new const TITLU[] = " \r- \y[ \rserver \w- \rAdmins \y] \r-"; new const IESIRE[] = "\r0. \yExit"; new const NOADMINS[] = "\rNo admins"; #pragma semicolon 1 new g_NumeGrade[ GRUPURI ][ ] = { "\rFounders", "\rOwner", "\rGods", "\rAdministrators", "\rModerators", "\rSlots" }; new g_Flaguri[ GRUPURI ][ ] = { "abcdefghijklmnopqrstu", "bcdefgijklmnopqrstu", "bcdefgijklmnopqrsu", "bcdefgijklmnotu", "bcdefgijklmno", "b" }; new g_ValueFlaguri[ GRUPURI ]; public plugin_init( ) { register_plugin( PLUGIN, VERSION, AUTHOR ); for( new i = 0 ; i < GRUPURI ; i++ ) g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] ); register_clcmd("say /who", "cmdWho"); register_clcmd("say who", "cmdWho"); register_clcmd("say_team who", "cmdWho"); register_clcmd("say_team /who", "cmdWho"); register_clcmd("say /admin", "cmdWho"); register_clcmd("say_team /admin", "cmdWho"); register_clcmd("say /admins", "cmdWho"); register_clcmd("say_team /admins", "cmdWho"); register_clcmd("say /admini", "cmdWho"); register_clcmd("say_team /admini", "cmdWho"); } public cmdWho( id, page ) { new MenuName[ 64 ], MenuExitKey[ 32 ]; formatex( MenuName, sizeof ( MenuName ) -1, "%s", TITLU ); formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s", IESIRE ); new menu = menu_create(MenuName, "InchidereMeniu"); if( AdminiON( ) ) { for( new i = 0; i < GRUPURI; i++ ) { AdaugareA( id, menu, i ); } } else { menu_additem( menu, NOADMINS , "1", 0 ); } menu_setprop(menu, MPROP_EXITNAME, MenuExitKey ); menu_display(id, menu, page); } public InchidereMeniu(id, menu, item) { if(item == MENU_EXIT) { menu_destroy( menu ); return 1; } new data[6], iName[64]; new iaccess, callback; menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback); new key = str_to_num(data); switch(key) { case 1,2,3,4,5,6,7: { menu_destroy( menu ); return 1; } } return 0; } public AdaugareA( const id, const menu, const group ) { new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1; static Players[ 32 ], Num, Player; get_players( Players, Num, "ch" ); for( new x = 0 ; x < Num ; x++ ) { Player = Players[ x ]; if( get_user_flags( Player ) == g_ValueFlaguri[ group ] ) { formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, " \w%s \y\w%s%s ", gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" ); formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey ); MenuKey++; } } for( new z = 1 ; z < MenuKey ; z++ ) { menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 ); } } stock bool:AdminiON( ) { new bool:AGasiti = false; static Players[ 32 ], Num, Player; get_players( Players, Num, "ch" ); for( new x = 0 ; x < Num ; x++ ) { Player = Players[ x ]; for( new i = 0 ; i < GRUPURI ; i++ ) { if( AGasiti ) break; if( get_user_flags( Player ) == g_ValueFlaguri[ i ] ) { AGasiti = true; } } } return AGasiti ? true : false; } stock gName( id ) { new name[ 32 ]; get_user_name( id, name, sizeof ( name ) -1 ); return name; }
5. FAKE BOT
==============
Descriere: Acest plugin adauga 3 boti spec.
Descarcare:
- fakebot.sma | Afiseaza codul
#include <amxmodx> #include <fakemeta> new const g_Names[][]= { "Yahoo: ionuxdmx66", "IP: 93.115.80.106:27015", "Forum: http://www.redfear.ro" }; new const szName[][] = { "+", "#", "%" } new Array:g_Messages; new g_Handler; new g_Query[256]; new name[32],Count[33] public plugin_init() { new a = fopen("z_out_hud_advertisements.ini", "r"); g_Handler = CreateHudSyncObj(); g_Messages = ArrayCreate(512); set_task( 15.0, "TaskManageBots", .flags="b" ); if (a) { new Line[512]; while (!feof(a)) { fgets(a, Line, sizeof(Line) - 1); trim(Line); if (Line[0]) { while(replace(Line, sizeof(Line)-1, "\n", "^n")){} ArrayPushString(g_Messages, Line); } } fclose(a); } else log_amx("Failed to open z_out_advertisements.ini file!"); if (ArraySize(g_Messages)) { set_task(30.0, "TaskAvertise", .flags = "b"); } register_forward(FM_ClientUserInfoChanged,"ClientUserInfoChanged"); register_clcmd("say","cmdSay") register_clcmd("say_team","cmdSay") set_task(120.0,"mesaj",_,_,_,"b") } public mesaj() color(0,"!g[Outstanding BugFix] !yThis server is protected by !teamBUGFIX UltimateX !g[20.09.14]") public cmdSay(id) { new szArgs[192],i read_args(szArgs,charsmax(szArgs)) for(i = 0; i < sizeof szName; i++) { if(containi(szArgs,szName) != -1) { Count[id]++ if(Count[id] == 2) { server_cmd("kick #%i ^"Fuck you with your CMD bug Crash.[2/2]^"",get_user_userid(id)) Count[id] = 0 return 1 } color(id,"!team[Outstanding BugFix] !yFuck your mother, don't try because you can't crash!g[%i/2]",Count[id]) return 1 } } return 0 } new g_Bot[33], g_BotsCount; public TaskManageBots(){ static PlayersNum; PlayersNum = get_playersnum( 1 ); if( PlayersNum < get_maxplayers() - 1 && g_BotsCount < 3 ) { CreateBot(); } else if( PlayersNum > get_maxplayers() - 1 && g_BotsCount ) { RemoveBot(); }} public client_disconnect(i) { if( g_Bot[ i ] ) { g_Bot[ i ] = 0, g_BotsCount -- ; } Count = 0 } RemoveBot(){ static i; for( i = 1; i <= get_maxplayers(); i++ ) { if( g_Bot[ i ] ) { server_cmd( "kick #%d", get_user_userid( i ) );break; }}} CreateBot(){ static Bot; formatex( g_Query, 255, !random_num(0,1)?"%s (%c%c)":"%s - %c%c",g_Names[random_num(0,sizeof(g_Names)-1)],random_num('A','Z'),random_num('A','Z') );Bot = engfunc( EngFunc_CreateFakeClient, g_Query ); if( Bot > 0 &&pev_valid(Bot)) { dllfunc(MetaFunc_CallGameEntity,"player",Bot); set_pev(Bot,pev_flags,FL_FAKECLIENT); set_pev(Bot, pev_model, ""); set_pev(Bot, pev_viewmodel2, ""); set_pev(Bot, pev_modelindex, 0); set_pev(Bot, pev_renderfx, kRenderFxNone); set_pev(Bot, pev_rendermode, kRenderTransAlpha); set_pev(Bot, pev_renderamt, 0.0); set_pdata_int(Bot,114,0); message_begin(MSG_ALL,get_user_msgid("TeamInfo")); write_byte(Bot); write_string("UNASSIGNED"); message_end(); g_Bot[Bot]=1; g_BotsCount++; } } public TaskAvertise() { static a,msg[512]; for (a = 1; a <= get_maxplayers(); a++) { if (is_user_connected(a) && !is_user_bot(a) && !is_user_hltv(a)) { set_hudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.0777, random_num(0, 2), random_float(0.7, 0.9), 12.0, random_float(0.37, 0.4), random_float(0.37, 0.4), 4); ArrayGetString(g_Messages,random_num(0,ArraySize(g_Messages)-1),msg,511); ShowSyncHudMsg(a, g_Handler, msg); } } } public client_connect(id) { static i get_user_name(id,name,charsmax(name)) for(i = 0; i < sizeof szName; i++) { if(containi(name,szName) != -1) { server_cmd("kick #%i ^"You can't join with this nick, Fuck You!^"",get_user_userid(id)) } } } public ClientUserInfoChanged(id) { static const name[] = "name" static szOldName[32],szNewName[32] static i pev(id,pev_netname,szOldName,charsmax(szOldName)) if(szOldName[0]) { get_user_info(id,name,szNewName,charsmax(szNewName)) for(i = 0; i < sizeof szName; i++) { if(containi(szNewName,szName) != -1) { set_user_info(id,name,szOldName) color(id,"!gFuck your mother if you want to try name bug.") return FMRES_HANDLED } } } return FMRES_IGNORED } stock color( const id, const input[ ], any:... ) { new count = 1, players[ 32 ] static msg[ 191 ] vformat( msg, 190, input, 3 ) replace_all( msg, 190, "!g", "^4" ) //- verde replace_all( msg, 190, "!y", "^1" ) //- galben replace_all( msg, 190, "!team", "^3" ) //- echipa replace_all( msg, 190, "!n", "^0" ) //- normal if( id ) players[ 0 ] = id; else get_players( players, count, "ch" ) { for( new i = 0; i < count; i++ ) { if( is_user_connected( players[ i ] ) ) { message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] ) write_byte( players[ i ] ); write_string( msg ); message_end( ); } } } }
6. Plugin: FREE VIP EVENT
====================
Descriere: Oferă beneficii VIP tuturor jucătorilor între anumite ore
Descărcare:
Link oficial plugin: Link eXtreamCS.Com
- | Afiseaza codul
#include <amxmodx> /* ADMIN_IMMUNITY = flag "a" ADMIN_RESERVATION = flag "b" ADMIN_KICK = flag "c" ADMIN_BAN = flag "d" ADMIN_SLAY = flag "e" ADMIN_MAP = flag "f" ADMIN_CVAR = flag "g" ADMIN_CFG = flag "h" ADMIN_CHAT = flag "i" ADMIN_VOTE = flag "j" ADMIN_PASSWORD = flag "k" ADMIN_RCON = flag "l" ADMIN_LEVEL_A = flag "m" ADMIN_LEVEL_B = flag "n" ADMIN_LEVEL_C = flag "o" ADMIN_LEVEL_D = flag "p" ADMIN_LEVEL_E = flag "q" ADMIN_LEVEL_F = flag "r" ADMIN_LEVEL_G = flag "s" ADMIN_LEVEL_H = flag "t" ADMIN_MENU = flag "u" ADMIN_ADMIN = flag "y" */ new ora = -1, bool:event_on, bool:prima_data, este_conectat[33] = {0}, are_vip[33] = {0}, are_vip2[33] = {0}, g_sync_hudmsg; #define PLUGIN_NAME "VIP EVENT" #define PLUGIN_VERSION "2.0" #define PLUGIN_AUTHOR "YONTU" #define TASK_VERIFICARE 129891 // -------------------------------------------- // ------------- DE EDITAT ---------------1 // -------------------------------------------- #define VIP_FLAG "t" // FLAGUL VIPULUI (vezi mai sus lista flagurilor) #define ORA_INCEPUT 21 // INTERVALUL ORAR (INCEPUT) #define ORA_SFARSIT 23 // INTERVALUL ORAR (SFARSIT) // -------------------------------------------- // ------------- DE EDITAT --------------- // -------------------------------------------- public plugin_init() { register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR); register_cvar("vipfree_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER); set_cvar_string("vipfree_", PLUGIN_VERSION); time(ora, _, _); event_on = (ora >= ORA_INCEPUT && ora < ORA_SFARSIT) ? true : false; prima_data = true; arrayset(este_conectat, 0, 33); arrayset(are_vip, 0, 33); arrayset(are_vip2, 0, 33); g_sync_hudmsg = CreateHudSyncObj(); set_task(60.0, "verifica_ora", TASK_VERIFICARE); set_task(3.0, "anunta_jucatori", TASK_VERIFICARE/random_num(2, 10)); } public verifica_ora(task) { time(ora, _, _); event_on = (ora >= ORA_INCEPUT && ora < ORA_SFARSIT) ? true : false; new jucatori[32], numar = 0, i, id; if(event_on) { if(prima_data) { ColorChat(id, "!4--------------------------------------------------------"); ColorChat(id, "!4***!1 EVENTUL!3 VIP FREE!1 A FOST ACTIVAT."); ColorChat(id, "!4***!1 Acesta va fi dezactivat la ora!4 %d!1.", ORA_SFARSIT); ColorChat(id, "!4--------------------------------------------------------"); prima_data = false; } get_players(jucatori, numar); for(i = 0; i < numar; i++) { id = jucatori; if(!este_conectat[id]) continue; if(are_vip[id]) continue; if(are_vip2[id]) continue; are_vip2[id] = 1; set_user_flags(id, read_flags(VIP_FLAG)); } } else { if(!prima_data) { get_players(jucatori, numar); for(i = 0; i < numar; i++) { id = jucatori; if(!este_conectat[id]) continue; remove_user_flags(id, read_flags(VIP_FLAG)); ColorChat(id, "!4-------------------------------------------------------------"); ColorChat(id, "!4***!1 EVENTUL!3 VIP FREE!1 A FOST DEZACTIVAT."); ColorChat(id, "!4***!1 Acesta va reincepe la ora!4 %d!1.", ORA_INCEPUT); ColorChat(id, "!4-------------------------------------------------------------"); } server_cmd("amx_default_access ^"z^""); server_cmd("amx_reloadadmins"); arrayset(are_vip, 0, 33); arrayset(are_vip2, 0, 33); prima_data = true; } } set_task(60.0, "verifica_ora", TASK_VERIFICARE); } public client_disconnect(id) { if(event_on) remove_user_flags(id, read_flags(VIP_FLAG)); } public client_putinserver(id) { este_conectat[id]++; set_task(3.0, "verifica_event", id); } public verifica_event(id) { if(!event_on) return; if(este_conectat[id] == 1) client_print(id, print_center, "AI NIMERIT FIX LA TANC! ESTE EVENT VIP FREE."); if(get_user_flags(id) & read_flags(VIP_FLAG)) are_vip[id] = true; else { are_vip2[id] = true; set_user_flags(id, read_flags(VIP_FLAG)); } } public anunta_jucatori() { if(!event_on) return; set_hudmessage(0, random(256), 0, -1.0, 0.12, 1, 3.0, 3.0); ShowSyncHudMsg(0, g_sync_hudmsg, "~~ Event VIP ON ~~"); set_task(3.0, "anunta_jucatori", TASK_VERIFICARE/random_num(2, 10)); } stock ColorChat(id, String[], any:...) { static szMesage[192]; vformat(szMesage, charsmax(szMesage), String, 3); replace_all(szMesage, charsmax(szMesage), "!1", "^1"); replace_all(szMesage, charsmax(szMesage), "!3", "^3"); replace_all(szMesage, charsmax(szMesage), "!4", "^4"); static g_msg_SayText = 0; if(!g_msg_SayText) g_msg_SayText = get_user_msgid("SayText"); new Players[32], iNum = 1, i; if(id) Players[0] = id; else get_players(Players, iNum, "ch"); for(--iNum; iNum >= 0; iNum--) { i = Players[iNum]; message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i); write_byte(i); write_string(szMesage); message_end(); } }
7. Plugin: FURIEN WALLHANG
Descriere: Jucătorii din echipa Terorist(FURIEN) poate merge pe ”pereți” fără vreun script anume, în același timp poate și ataca
Descărcare:
- | Afiseaza codul
#include <amxmodx> #include <engine> #include <fakemeta> #include <hamsandwich> #define VERSION "0.0.2" #define XTRA_OFS_PLAYER 5 #define m_Activity 73 #define m_IdealActivity 74 #define m_flNextAttack 83 #define m_afButtonPressed 246 #define FIRST_PLAYER_ID 1 #define MAX_PLAYERS 32 #define PLAYER_JUMP 6 #define ACT_HOP 7 //#define FBitSet(%1,%2) (%1 & %2) new g_iMaxPlayers #define IsPlayer(%1) ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers ) #define IsHidden(%1) IsPlayer(%1) #define KNIFE_DRAW 3 new g_bHasWallHang #define SetUserWallHang(%1) g_bHasWallHang |= 1<<(%1&31) #define RemoveUserWallHang(%1) g_bHasWallHang &= ~(1<<(%1&31)) #define HasUserWallHang(%1) g_bHasWallHang & 1<<(%1&31) new g_bHanged #define SetUserHanged(%1) g_bHanged |= 1<<(%1&31) #define RemoveUserHanged(%1) g_bHanged &= ~(1<<(%1&31)) #define IsUserHanged(%1) g_bHanged & 1<<(%1&31) new Float:g_fVecMins[MAX_PLAYERS+1][3] new Float:g_fVecMaxs[MAX_PLAYERS+1][3] new Float:g_fVecOrigin[MAX_PLAYERS+1][3] new bool:g_bRoundEnd public plugin_init() { register_plugin("Furien WallHang", VERSION, "ConnorMcLeod") RegisterHam(Ham_Player_Jump, "player", "Player_Jump") RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawnPost", true ); RegisterHam( Ham_Killed, "player", "Ham_PlayerKilledPost", true ); RegisterHam(Ham_Touch, "func_wall", "World_Touch") RegisterHam(Ham_Touch, "func_breakable", "World_Touch") RegisterHam(Ham_Touch, "worldspawn", "World_Touch") g_iMaxPlayers = get_maxplayers() register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0") register_logevent("Logevent_Round_End", 2, "1=Round_End") } public Ham_PlayerSpawnPost( id ) { if( is_user_alive( id ) ) { if( get_user_team( id ) == 1 ) { if( get_user_flags( id ) & ADMIN_CVAR ) { SetUserWallHang( id ); RemoveUserHanged( id ); } } else { RemoveUserWallHang( id ); RemoveUserHanged( id ); } } } public Ham_PlayerKilledPost( id ) { RemoveUserHanged( id ); return HAM_IGNORED; } public Event_HLTV_New_Round() { g_bRoundEnd = false } public Logevent_Round_End() { g_bRoundEnd = true g_bHanged = 0 } public client_putinserver( id ) { RemoveUserWallHang( id ) RemoveUserHanged( id ) } public furien_round_restart() { g_bHasWallHang = 0 g_bHanged = 0 } public Player_Jump(id) { if( g_bRoundEnd || ~HasUserWallHang(id) || ~IsUserHanged(id) || !is_user_alive(id) ) { return HAM_IGNORED } if( (pev(id, pev_flags) & FL_WATERJUMP) || pev(id, pev_waterlevel) >= 2 ) { return HAM_IGNORED } static afButtonPressed ; afButtonPressed = get_pdata_int(id, m_afButtonPressed) if( ~afButtonPressed & IN_JUMP ) { return HAM_IGNORED } RemoveUserHanged(id) new Float:fVecVelocity[3] velocity_by_aim(id, 600, fVecVelocity) set_pev(id, pev_velocity, fVecVelocity) set_pdata_int(id, m_Activity, ACT_HOP) set_pdata_int(id, m_IdealActivity, ACT_HOP) set_pev(id, pev_gaitsequence, PLAYER_JUMP) set_pev(id, pev_frame, 0.0) set_pdata_int(id, m_afButtonPressed, afButtonPressed & ~IN_JUMP) return HAM_SUPERCEDE } public client_PostThink(id) { if( HasUserWallHang(id) && IsUserHanged(id) ) { engfunc(EngFunc_SetSize, id, g_fVecMins[ id ], g_fVecMaxs[ id ]) engfunc(EngFunc_SetOrigin, id, g_fVecOrigin[ id ]) set_pev(id, pev_velocity, 0) //set_pdata_float(id, m_flNextAttack, 1.0, XTRA_OFS_PLAYER) } } public World_Touch(iEnt, id) { if( !g_bRoundEnd && IsPlayer(id) && HasUserWallHang(id) && ~IsUserHanged(id) && is_user_alive(id) && pev(id, pev_button) & IN_USE && ~pev(id, pev_flags) & FL_ONGROUND ) { SetUserHanged(id) pev(id, pev_mins, g_fVecMins[id]) pev(id, pev_maxs, g_fVecMaxs[id]) pev(id, pev_origin, g_fVecOrigin[id]) } }
8. Plugin: Team Swap
====================
Descriere: Schimbă echipele între ele după 15 runde. De asemenea se poate modifica din sursă numărul rundelor.
Descărcare:
- | Afiseaza codul
#include <amxmodx> #include <cstrike> #define PLUGIN "Team Swap-CS:GO Like" #define VERSION "1.0" #define AUTHOR "DaNNe. w/ Askhahnar" new Round; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End") } public LOGEVENT_RoundEnd() { Round++ if(Round == 15) { new Players[32], Num, id; get_players(Players, Num, "c") if(Num) { for(new i; i < Num; i++) { id = Players TEAMSWAP_Delay(id) } } client_print(0, print_chat, "[%s] ECHIPELE AU FOST SCHIMBATE", PLUGIN) Round = 0 set_cvar_num("sv_restart", 1) } } public TEAMSWAP_Delay(id) { if(is_user_connected(id)) { switch(id) { case 1..7: set_task(0.1, "BEGIN_TeamSwap", id) case 8..15: set_task(0.2, "BEGIN_TeamSwap", id) case 16..23: set_task(0.3, "BEGIN_TeamSwap", id) case 24..32: set_task(0.4, "BEGIN_TeamSwap", id) } } } public BEGIN_TeamSwap(id) { if(is_user_connected(id)) { switch(get_user_team(id)) { case 1: cs_set_user_team(id, CS_TEAM_CT) case 2: cs_set_user_team(id, CS_TEAM_T) } } }