Csatlakozott:2013.08.09. 22:37 Hozzászólások:571 Megköszönt másnak: 10 alkalommal Megköszönték neki: 85 alkalommal
|
Speclist: (Ha szeretnéd hogy több színnel csinálja csak jelezd!!) #include <amxmodx> #include <fakemeta> #pragma semicolon 1 #define RED 255 #define GREEN 0 #define BLUE 0 #define UPDATEINTERVAL 1.0 // Comment below if you do not want /speclist showing up on chat #define ECHOCMD // Admin flag used for immunity #define FLAG ADMIN_KICK new const PLUGIN[] = "SpecList"; new const VERSION[] = "1.2"; new const AUTHOR[] = "FatalisDK"; new gMaxPlayers; new gCvarOn; new gCvarImmunity; new bool:gOnOff[33] = { true, ... }; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_cvar(PLUGIN, VERSION, FCVAR_SERVER, 0.0); gCvarOn = register_cvar("amx_speclist", "1", 0, 0.0); gCvarImmunity = register_cvar("amx_speclist_immunity", "1", 0, 0.0); register_clcmd("say /speclist", "cmdSpecList", -1, ""); gMaxPlayers = get_maxplayers(); set_task(UPDATEINTERVAL, "tskShowSpec", 123094, "", 0, "b", 0); } public cmdSpecList(id) { if( gOnOff[id] ) { client_print(id, print_chat, "[AMXX] Mostmar nem fogod latni ki nez teged."); gOnOff[id] = false; } else { client_print(id, print_chat, "[AMXX] Mostmar latni fogod ki nez teged."); gOnOff[id] = true; } #if defined ECHOCMD return PLUGIN_CONTINUE; #else return PLUGIN_HANDLED; #endif } public tskShowSpec() { if( !get_pcvar_num(gCvarOn) ) { return PLUGIN_CONTINUE; } static szHud[1102];//32*33+45 static szName[34]; static bool:send; // FRUITLOOOOOOOOOOOOPS! for( new alive = 1; alive <= gMaxPlayers; alive++ ) { new bool:sendTo[33]; send = false; if( !is_user_alive(alive) ) { continue; } sendTo[alive] = true; get_user_name(alive, szName, 32); format(szHud, 45, "%s nezoi:^n", szName); for( new dead = 1; dead <= gMaxPlayers; dead++ ) { if( is_user_connected(dead) ) { if( is_user_alive(dead) || is_user_bot(dead) ) { continue; } if( pev(dead, pev_iuser2) == alive ) { if( !(get_pcvar_num(gCvarImmunity)&&get_user_flags(dead, 0)&FLAG) ) { get_user_name(dead, szName, 32); add(szName, 33, "^n", 0); add(szHud, 1101, szName, 0); send = true; } sendTo[dead] = true; } } } if( send == true ) { for( new i = 1; i <= gMaxPlayers; i++ ) { if( sendTo[i] == true && gOnOff[i] == true ) { set_hudmessage(RED, GREEN, BLUE 0.75, 0.12, 0, 0.0, 1.1, 0.0, 0.0, 1); show_hudmessage(i, szHud); } } } } return PLUGIN_CONTINUE; } public client_connect(id) { gOnOff[id] = true; } public client_disconnect(id) { gOnOff[id] = true; }
Sebzés kiíró: #include <amxmodx> #define PLUGIN "Bullet Damage" #define AUTHOR "ConnorMcLeod" #define VERSION "0.0.1" #define MAX_PLAYERS 32 new const Float:g_flCoords[][] = { {0.50, 0.40}, {0.56, 0.44}, {0.60, 0.50}, {0.56, 0.56}, {0.50, 0.60}, {0.44, 0.56}, {0.40, 0.50}, {0.44, 0.44} } new g_iPlayerPos[MAX_PLAYERS+1] new g_iMaxPlayers new g_pCvarEnabled public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) g_pCvarEnabled = register_cvar("bullet_damage", "1") register_event("Damage", "Event_Damage", "b", "2>0", "3=0") g_iMaxPlayers = get_maxplayers() } public Event_Damage( iVictim ) { if( get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) ) { new id = get_user_attacker(iVictim) if( (1 <= id <= g_iMaxPlayers) && is_user_connected(id) ) { new iPos = ++g_iPlayerPos[id] if( iPos == sizeof(g_flCoords) ) { iPos = g_iPlayerPos[id] = 0 } set_hudmessage(0, 255, 255, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1) show_hudmessage(id, "%d", read_data(2)) } } }
|
|