Witam moglby mi ktos dopisac do tych pluginów zeby mozna bylo wpisac /vip do vipa i /svip do svipa i zeby wyswietlalo txt ? Czyli te informacje o vipie i svipie
SVIP:
#include <amxmodx> #include <cstrike> #include <engine> #include <fakemeta> #include <fun> #include <hamsandwich> #define FL_ONGROUND (1<<9) #define FL_WATERJUMP (1<<11) #define IsPlayer(%1) (1<=%1<=maxPlayers) new const v_Bron_Knife[] = "models/baseball/v_baseball.mdl"; /* Tutaj zmieniamy sciezki do modeli */ new const p_Bron_Knife[] = "models/baseball/p_baseball.mdl"; /* Tutaj zmieniamy sciezki do modeli */ forward amxbans_admin_connect(id); new Array:g_Array, bool:g_Vip[33], g_Hudmsg, ioid, maxPlayers, skoki[33]; new const g_Langcmd[][]={"say /vips","say_team /vips","say /vipy","say_team /vipy"}; public plugin_init(){ register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill"); register_forward(FM_CmdStart, "CmdStartPre"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); register_event("CurWeapon","CurWeapon","be", "1=1") RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0); register_message(get_user_msgid("ScoreAttrib"), "VipStatus"); g_Array=ArrayCreate(64,32); for(new i;i<sizeof g_Langcmd;i++){ register_clcmd(g_Langcmd[i], "ShowVips"); } register_message(get_user_msgid("SayText"),"handleSayText"); g_Hudmsg=CreateHudSyncObj(); } public plugin_precache() { precache_model(v_Bron_Knife); precache_model(p_Bron_Knife); } public CurWeapon(id) { new wpn = read_data(2) if(get_user_team(id) == 1 && get_user_flags(id) & ADMIN_LEVEL_G && wpn == CSW_KNIFE){ /// tutaj zmieniamy flage vipa aktualnie jest ADMIN_LEVEL_H = flanga t, lom ustawiony tylko dla tt "get_user_team(id) == 1" set_pev(id, pev_viewmodel2, v_Bron_Knife) set_pev(id,pev_weaponmodel2, p_Bron_Knife) } } public client_authorized(id){ if(get_user_flags(id) & 262144 == 262144){ client_authorized_vip(id); } } public client_authorized_vip(id){ g_Vip[id]=true; new g_Name[64]; get_user_name(id,g_Name,charsmax(g_Name)); new g_Size = ArraySize(g_Array); new szName[64]; for(new i = 0; i < g_Size; i++){ ArrayGetString(g_Array, i, szName, charsmax(szName)); if(equal(g_Name, szName)){ return 0; } } ArrayPushString(g_Array,g_Name); set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0); ShowSyncHudMsg(0, g_Hudmsg, "SuperVIP %s wbija na serwer !",g_Name); return PLUGIN_CONTINUE; } public client_disconnect(id){ if(g_Vip[id]){ client_disconnect_vip(id); } } public client_disconnect_vip(id){ g_Vip[id]=false; new Name[64]; get_user_name(id,Name,charsmax(Name)); new g_Size = ArraySize(g_Array); new g_Name[64]; for(new i = 0; i < g_Size; i++){ ArrayGetString(g_Array, i, g_Name, charsmax(g_Name)); if(equal(g_Name,Name)){ ArrayDeleteItem(g_Array,i); break; } } } public CmdStartPre(id, uc_handle){ if(g_Vip[id]){ if(is_user_alive(id)){ CmdStartPreVip(id, uc_handle); } } } public CmdStartPreVip(id, uc_handle){ new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){ --skoki[id]; new Float:velocity[3]; pev(id, pev_velocity,velocity); velocity[2] = random_float(265.0,285.0); set_pev(id,pev_velocity,velocity); } else if(flags & FL_ONGROUND && skoki[id]!=-1){ skoki[id] = 2; } } public SpawnedEventPre(id){ if(g_Vip[id]){ if(is_user_alive(id)){ SpawnedEventPreVip(id); } } } public SpawnedEventPreVip(id){ skoki[id]=2; set_user_health(id, get_user_health(id)+100); new henum=(user_has_weapon(id,CSW_HEGRENADE)?cs_get_user_bpammo(id,CSW_HEGRENADE):0); give_item(id, "weapon_hegrenade"); ++henum; new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0); give_item(id, "weapon_flashbang"); ++fbnum; cs_set_user_bpammo(id, CSW_FLASHBANG, 2); new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0); give_item(id, "weapon_smokegrenade"); ++sgnum; } public plugin_cfg(){ maxPlayers=get_maxplayers(); } public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){ if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) || (ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){ damage*=(100+20)/100; } } public VipStatus(){ new id=get_msg_arg_int(1); if(is_user_alive(id) && g_Vip[id]){ set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4); } } public ShowVips(id){ return PLUGIN_CONTINUE; } public client_infochanged(id){ if(g_Vip[id]){ new szName[64]; get_user_info(id,"name",szName,charsmax(szName)); new Name[64]; get_user_name(id,Name,charsmax(Name)); if(!equal(szName,Name)){ ArrayPushString(g_Array,szName); new g_Size=ArraySize(g_Array); new g_Name[64]; for(new i = 0; i < g_Size; i++){ ArrayGetString(g_Array, i, g_Name, charsmax(g_Name)); if(equal(g_Name,Name)){ ArrayDeleteItem(g_Array,i); break; } } } } } public plugin_end(){ ArrayDestroy(g_Array); } public handleSayText(msgId,msgDest,msgEnt){ new id = get_msg_arg_int(1); if(is_user_connected(id) && g_Vip[id]){ new szTmp[256],szTmp2[256]; get_msg_arg_string(2,szTmp, charsmax(szTmp)) new szPrefix[64] = "^x04[SVIP]"; if(!equal(szTmp,"#Cstrike_Chat_All")){ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2)," "); add(szTmp2,charsmax(szTmp2),szTmp); } else{ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2"); } set_msg_arg_string(2,szTmp2); } return PLUGIN_CONTINUE; } public client_PreThink(id){ if(g_Vip[id] && is_user_alive(id)){ client_PreThinkVip(id); } } public client_PreThinkVip(id){ entity_set_float(id, EV_FL_fuser2, 0.0); if(entity_get_int(id, EV_INT_button) & 2){ new flags = entity_get_int(id, EV_INT_flags); if(flags & FL_WATERJUMP || entity_get_int(id, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND)){ return PLUGIN_CONTINUE; } new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); velocity[2] += 250.0; entity_set_vector(id, EV_VEC_velocity, velocity); entity_set_int(id, EV_INT_gaitsequence, 6); } return PLUGIN_CONTINUE; } public amxbans_admin_connect(id){ client_authorized(id); } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
VIP:
#include <amxmodx> #include <cstrike> #include <engine> #include <fakemeta> #include <fun> #include <hamsandwich> #define IsPlayer(%1) (1<=%1<=maxPlayers) forward amxbans_admin_connect(id); new Array:g_Array, bool:g_Vip[33], g_Hudmsg, ioid, maxPlayers, skoki[33]; /* -------------------------------------------------------------------------------------- */ new const v_Bron_Knife[] = "models/lom/v_lom.mdl"; /* Tutaj zmieniamy sciezki do modeli */ new const p_Bron_Knife[] = "models/lom/p_lom.mdl"; /* Tutaj zmieniamy sciezki do modeli */ /* -------------------------------------------------------------------------------------- */ new const g_Langcmd[][]={"say /vips","say_team /vips","say /vipy","say_team /vipy"}; public plugin_init(){ register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill"); register_forward(FM_CmdStart, "CmdStartPre"); RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1); RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0); register_event("CurWeapon","CurWeapon","be", "1=1") register_message(get_user_msgid("ScoreAttrib"), "VipStatus"); g_Array=ArrayCreate(64,32); for(new i;i<sizeof g_Langcmd;i++){ register_clcmd(g_Langcmd[i], "ShowVips"); } register_message(get_user_msgid("SayText"),"handleSayText"); g_Hudmsg=CreateHudSyncObj(); } public plugin_precache() { precache_model(v_Bron_Knife); precache_model(p_Bron_Knife); } public CurWeapon(id) { new wpn = read_data(2) if(get_user_team(id) == 1 && get_user_flags(id) & ADMIN_LEVEL_H && wpn == CSW_KNIFE){ /// tutaj zmieniamy flage vipa aktualnie jest ADMIN_LEVEL_H = flanga t, lom ustawiony tylko dla tt "get_user_team(id) == 1" set_pev(id, pev_viewmodel2, v_Bron_Knife) set_pev(id,pev_weaponmodel2, p_Bron_Knife) } } public client_authorized(id){ if(get_user_flags(id) & 524288 == 524288){ client_authorized_vip(id); } } public client_authorized_vip(id){ g_Vip[id]=true; new g_Name[64]; get_user_name(id,g_Name,charsmax(g_Name)); new g_Size = ArraySize(g_Array); new szName[64]; for(new i = 0; i < g_Size; i++){ ArrayGetString(g_Array, i, szName, charsmax(szName)); if(equal(g_Name, szName)){ return 0; } } ArrayPushString(g_Array,g_Name); set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0); ShowSyncHudMsg(0, g_Hudmsg, "VIP %s wbija na serwer !",g_Name); return PLUGIN_CONTINUE; } public client_disconnect(id){ if(g_Vip[id]){ client_disconnect_vip(id); } } public client_disconnect_vip(id){ g_Vip[id]=false; new Name[64]; get_user_name(id,Name,charsmax(Name)); new g_Size = ArraySize(g_Array); new g_Name[64]; for(new i = 0; i < g_Size; i++){ ArrayGetString(g_Array, i, g_Name, charsmax(g_Name)); if(equal(g_Name,Name)){ ArrayDeleteItem(g_Array,i); break; } } } public CmdStartPre(id, uc_handle){ if(g_Vip[id]){ if(is_user_alive(id)){ CmdStartPreVip(id, uc_handle); } } } public CmdStartPreVip(id, uc_handle){ new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){ --skoki[id]; new Float:velocity[3]; pev(id, pev_velocity,velocity); velocity[2] = random_float(265.0,285.0); set_pev(id,pev_velocity,velocity); } else if(flags & FL_ONGROUND && skoki[id]!=-1){ skoki[id] = 1; } } public SpawnedEventPre(id){ if(g_Vip[id]){ if(is_user_alive(id)){ SpawnedEventPreVip(id); } } } public SpawnedEventPreVip(id){ skoki[id]=1; set_user_health(id, get_user_health(id)+20); new fbnum=(user_has_weapon(id,CSW_FLASHBANG)?cs_get_user_bpammo(id,CSW_FLASHBANG):0); give_item(id, "weapon_flashbang"); ++fbnum; new sgnum=(user_has_weapon(id,CSW_SMOKEGRENADE)?cs_get_user_bpammo(id,CSW_SMOKEGRENADE):0); give_item(id, "weapon_smokegrenade"); ++sgnum; } public plugin_cfg(){ maxPlayers=get_maxplayers(); } public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){ if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) || (ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){ damage*=(100+15)/100; } } public VipStatus(){ new id=get_msg_arg_int(1); if(is_user_alive(id) && g_Vip[id]){ set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4); } } public ShowVips(id){ return PLUGIN_CONTINUE; } public client_infochanged(id){ if(g_Vip[id]){ new szName[64]; get_user_info(id,"name",szName,charsmax(szName)); new Name[64]; get_user_name(id,Name,charsmax(Name)); if(!equal(szName,Name)){ ArrayPushString(g_Array,szName); new g_Size=ArraySize(g_Array); new g_Name[64]; for(new i = 0; i < g_Size; i++){ ArrayGetString(g_Array, i, g_Name, charsmax(g_Name)); if(equal(g_Name,Name)){ ArrayDeleteItem(g_Array,i); break; } } } } } public plugin_end(){ ArrayDestroy(g_Array); } public handleSayText(msgId,msgDest,msgEnt){ new id = get_msg_arg_int(1); if(is_user_connected(id) && g_Vip[id]){ new szTmp[256],szTmp2[256]; get_msg_arg_string(2,szTmp, charsmax(szTmp)) new szPrefix[64] = "^x04[VIP]"; if(!equal(szTmp,"#Cstrike_Chat_All")){ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2)," "); add(szTmp2,charsmax(szTmp2),szTmp); } else{ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2"); } set_msg_arg_string(2,szTmp2); } return PLUGIN_CONTINUE; } public amxbans_admin_connect(id){ client_authorized(id); } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1045{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par } */