Rank: Moderator Status: Posturi : 537 Reputatie : 13 Data de Inscriere : 05/08/2014 Oras : ORAS RGZ Varsta : 27
| Subiect: DeathRun Vip System Lun Aug 18, 2014 6:33 pm |
|
| Descriere : Acest plugin ofera "ajutor" persoanei cu un anumit flag. 0.2 -Added Cvars-Added new items in menu-Optimized cod-Bug speed rezolved-Removed skin-Added /vips-Added limit for menu-Added bonus for Terorist Team-Colored message Descarcare : LinkNume : DeathRun VIP Versiune : 0.2 Autor : FaTzZu Instalare :1. Fisierul drvip.amxx il puneti in addons/amxmodx/plugins 2. Fisierul drvip.sma il puneti in addons/amxmodx/scripting 3. Fisierul vip.html il puneti in addons/amxmodx/configs 4. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma: Cod:drvip.amxx Cvar-uri :-vip_gravity - gravity din menu (default 600) -vip_speed - speed din menu (default 600) -vip_hp - hp la spawn (default 150) -vip_ap - hp la spawn (default 100) Flagul pentru VIP este "t"Comenzi publice : /vmenu - doar VIPS au acces /vip - arata un motd cu avantajele Vipului /vips - arata vips onlineModule necesare : -cstrike -fun -hamsandwichSursa : - Cod:
-
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich>
#pragma semicolon 1
#define PLUGIN "Deathrun VIP" #define VERSION "0.2" #define AUTHOR "FaTzZu"
#define ACCES ADMIN_LEVEL_H // Aici schimbati accesul
new g_ScoreAttrib; new cvar_speed, cvar_gravity, cvar_hp, cvar_ap; new Has_Speed[33]; new Has_Chose [ 33 ];
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); cvar_gravity = register_cvar("vip_gravity", "600"); cvar_speed = register_cvar("vip_speed", "300"); cvar_hp = register_cvar("vip_hp", "150"); cvar_hp = register_cvar("vip_ap", "100"); RegisterHam(Ham_Spawn, "player", "PlayerSpawm"); register_clcmd("say /vmenu", "drvip_menu"); register_clcmd("say_team /vmenu", "drvip_menu"); register_clcmd ("say /vip" , "wantvip" , -1); register_clcmd ("say_team /vip" , "wantvip" , -1); register_clcmd("say", "handle_say"); register_clcmd("say_team", "handle_say"); register_event( "CurWeapon", "CurWeapon", "be", "1=1" ); }
public CurWeapon( id ) { if( Has_Speed[ id ] ) { set_user_maxspeed( id, get_pcvar_float( cvar_speed ) ); } }
public PlayerSpawm(id) { new iPlayers [ 32 ]; new iNum; get_players ( iPlayers, iNum ); for ( new i = 0; i < iNum; i++ ) { Has_Chose [ iPlayers [ i ] ] = 0; } if(!is_user_alive(id)) return 1; if(get_user_flags(id) & ACCES) { new CsTeams:team = cs_get_user_team(id); switch(team) { case CS_TEAM_T: { set_user_health(id, get_pcvar_num(cvar_hp)); set_user_armor(id, get_pcvar_num(cvar_ap)); set_user_scoreattrib(id, 4); Has_Speed[id] = false; } case CS_TEAM_CT: { strip_user_weapons(id); set_user_health(id, get_pcvar_num(cvar_hp)); set_user_armor(id, get_pcvar_num(cvar_ap)); give_item(id, "weapon_usp"); cs_set_user_bpammo(id, CSW_USP, 100); give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); set_user_scoreattrib(id, 4); Has_Speed[id] = false; } } } return 1; }
public drvip_menu(id){ if ( Has_Chose [ id ] == 1 ) { ColorChat( id, "^x01Ai folosit deja ^x04meniul ." ); } if(get_user_team(id) == 1) { ColorChat(id, "^x01Doar^x04 CT^x01 pot folosi meniul"); return 1; } if(get_user_flags(id) & ACCES) { new menu = menu_create("\yVIP Menu Deathrun:\r", "drvip_handler"); menu_additem(menu, "\yAk47", "1", 0); menu_additem(menu, "\yM4a1", "2", 0); menu_additem(menu, "\yDeagle", "3", 0); menu_additem(menu, "\ySpeed", "4", 0); menu_additem(menu, "\yGravity", "5", 0); menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0); } else { ColorChat(id, "^x01Doar^x04 VIP^x01 pot folosi meniul"); return 1; } return 1; }
public drvip_handler(id, menu, item){ if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], iName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,5, iName, 63, callback); new key = str_to_num(data); switch(key) { case 1: { give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, CSW_AK47, 90); ColorChat(id, "^x01Ai primit %i ^x04Ak47"); Has_Speed[id] = false; Has_Chose[id] ++; } case 2: { give_item(id, "weapon_m4a1"); cs_set_user_bpammo(id, CSW_M4A1, 90); ColorChat(id, "^x01Ai primit %i ^x04M4a1"); Has_Speed[id] = false; Has_Chose[id] ++; } case 3: { give_item(id, "weapon_deagle"); cs_set_user_bpammo(id, CSW_DEAGLE, 32); ColorChat(id, "^x01Ai primit %i ^x04Deagle"); Has_Speed[id] = false; Has_Chose[id] ++; } case 4: { set_user_maxspeed(id, get_pcvar_float(cvar_speed)); ColorChat(id, "^x01Ai primit %i ^x04Speed"); Has_Speed[id] = true; Has_Chose[id] ++; } case 5: { set_user_gravity(id, get_pcvar_float(cvar_gravity) / 800); ColorChat(id, "^x01Ai primit ^x04Gravity"); Has_Speed[id] = false; Has_Chose[id] ++; } } menu_destroy(menu); return PLUGIN_HANDLED; }
public print_adminlist(user) { new adminnames[33][32]; new message[256]; new id, count, x, len; for(id = 1 ; id <= get_maxplayers() ; id++) if(is_user_connected(id)) if(get_user_flags(id) & ACCES) get_user_name(id, adminnames[count++], 31); len = format(message, 255, "^x04 VIP ONLINE: "); if(count > 0) { for(x = 0 ; x < count ; x++) { len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":""); if(len > 96) { print_message(user, message); len = format(message, 255, "^x04 "); } } print_message(user, message); } else { len += format(message[len], 255-len, "No VIP online."); print_message(user, message); } } print_message(id, msg[]) { message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id); write_byte(id); write_string(msg); message_end(); }
public handle_say(id) { new said[192]; read_args(said,192); if(contain(said, "/vips") != -1) set_task(0.1,"print_adminlist",id); return PLUGIN_CONTINUE; }
public wantvip(id) show_motd(id,"/addons/amxmodx/configs/vip.html");
stock set_user_scoreattrib(id, attrib = 0){ message_begin(MSG_BROADCAST, g_ScoreAttrib, _, 0); write_byte(id); write_byte(attrib); message_end( ); }
stock ColorChat(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "^x04", "^4"); replace_all(msg, 190, "^x01", "^1"); replace_all(msg, 190, "^x03", "^3"); 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(); } } } } |
|