Engine_ShoT 19 Posted August 2, 2016 Share Posted August 2, 2016 Nume :Vip cu list Versiune :nu conteaza Descriere detaliata :vreau ca vip-ul sa aiba un fel de user.ini pun doar numele si sa aiba vip. Link to comment Share on other sites More sharing options...
fantasyxd. 0 Posted August 2, 2016 Share Posted August 2, 2016 ce flag sa fie? Link to comment Share on other sites More sharing options...
Engine_ShoT 19 Posted August 2, 2016 Author Share Posted August 2, 2016 Eu vreau sa fie ca un fel de lista ca cum notezi admini in user.ini dar sa pui doar numele fara flag Link to comment Share on other sites More sharing options...
LondoN eXtream 110 Posted August 2, 2016 Share Posted August 2, 2016 cat oferi daca iti fac un sistem vip + un sistem de autentificare pe nume/parola/flag/flag2? Link to comment Share on other sites More sharing options...
Engine_ShoT 19 Posted August 2, 2016 Author Share Posted August 2, 2016 dupa cum am spus eu vreau ce am cerut mai sus. Link to comment Share on other sites More sharing options...
marvel_team 278 Posted August 3, 2016 Share Posted August 3, 2016 Cred ca asta este cel mai apropiat de ce ai cerut tu : are vip.ini #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich> #include <fakemeta_util> #define PLUGIN "VIP Sistem" #define VERSION "1.0" #define AUTHOR "Hasky" new gfi_WorkFile[ 128 ]; new gs_VipsList[ 128 ][ 32 ], gi_TotalLines; new gi_IsUserVip[ 33 ]; new g_pVisiblity; new const gs_VipsFile[ ] = "vips.ini"; enum { Primary = 1 , Secondary , Knife , Grenades , C4 }; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_concmd("say /vips", "showAdmin", ADMIN_ALL, "") register_clcmd( "say /powers","Powermenu" ); g_pVisiblity = register_cvar( "km_invis", "150" ); // 255 = vizibil total } public plugin_cfg ( ) { new fi_Dir[ 64 ]; get_configsdir ( fi_Dir, charsmax ( fi_Dir ) ); formatex ( gfi_WorkFile, charsmax ( gfi_WorkFile ), "%s/%s", fi_Dir, gs_VipsFile ); if ( ! file_exists ( gfi_WorkFile ) ) write_file ( gfi_WorkFile, "; *VIP List*" ); new s_Buffer[ 192 ], i_Line, i_Len; while ( ( i_Line = read_file ( gfi_WorkFile, i_Line, s_Buffer, charsmax ( s_Buffer ), i_Len ) ) ) { if ( ! strlen ( s_Buffer ) || s_Buffer[ 0 ] == ';' || ( s_Buffer[ 0 ] == '/' && s_Buffer[ 1 ] == '/' ) ) continue; copy ( gs_VipsList[ gi_TotalLines++ ], 32, s_Buffer ); } } public client_putinserver ( id ) gi_IsUserVip[ id ] = 0; public client_disconnect ( id ) gi_IsUserVip[ id ] = 0; public Powermenu( id ) { if ( ! is_user_alive ( id ) ) return PLUGIN_HANDLED if ( ! is_user_vip ( id ) ) { gi_IsUserVip[ id ] = 0; return PLUGIN_HANDLED } gi_IsUserVip[ id ] = 1; new menu = menu_create( "\rPowers Menu:", "menu_handler" ); menu_additem( menu, "\wViteza 1600", "1", 0 ); menu_additem( menu, "\wGravity 250", "2", 0 ); menu_additem( menu, "\wAk47", "3",0 ); menu_additem( menu, "\wM4a1", "4",0 ); menu_additem( menu, "\wDeagle", "5",0 ); menu_additem( menu, "\wAwp", "6",0 ); menu_additem( menu, "\wPachet full he", "7",0 ); menu_additem( menu, "\w200hp", "8",0 ); menu_additem( menu, "\w200 armura", "9",0 ); menu_additem( menu, "\wInvizibiliatate", "10",0 ); menu_setprop( menu, MPROP_EXIT, MEXIT_ALL ); menu_display( id, menu, 0 ); return PLUGIN_HANDLED } public menu_handler( id, menu, item ) { switch( item ) { case 0: { set_pev( id, pev_maxspeed, 1600.0 ) } case 1: { set_pev( id, pev_gravity, 0.3125) } case 2: { StripWeapons(id, Primary) give_item(id,"weapon_ak47") cs_set_user_bpammo(id, CSW_AK47, 90); } case 3: { StripWeapons(id, Primary) give_item(id,"weapon_m4a1") cs_set_user_bpammo(id, CSW_M4A1, 90 ); } case 4: { StripWeapons(id, Secondary); give_item(id,"weapon_deagle") cs_set_user_bpammo(id, CSW_DEAGLE, 35 ); } case 5: { StripWeapons(id, Primary) give_item(id,"weapon_awp") cs_set_user_bpammo(id, CSW_AWP, 30 ); } case 6: { give_item(id, "weapon_hegrenade") give_item(id, "weapon_flashbang") give_item(id, "weapon_flashbang") give_item(id, "weapon_smokegrenade") } case 7: { set_user_health(id,200) } case 8: { set_user_armor(id,200) } case 9: { set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, get_pcvar_num( g_pVisiblity ) ); } } menu_destroy( menu ); return PLUGIN_HANDLED; } public showAdmin(id) { new num, iLen, admin static pl[32], name[32], szBuff[2048] get_players(pl, num, "c") for(new i = 0; i < num; i++) { if ( is_user_vip ( pl ) ) { gi_IsUserVip[ pl ] = 1; get_user_name(pl, name, 31) iLen += format(szBuff[iLen], 2048 - iLen, "%d. %s^n", admin + 1, name) admin++ } } set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 6.0, 7.0 ) show_hudmessage(id, " %s online:^n%s", admin > 1 ? "Vips" : "Vips", szBuff) arrayset(szBuff, 0, 2048) return PLUGIN_HANDLED } //======================================================================================== stock is_user_vip ( id ) { new s_Name[ 32 ], s_AuthID[ 32 ]; get_user_name ( id, s_Name, 31 ); get_user_authid ( id, s_AuthID, 31 ); for ( new i; i < gi_TotalLines; i++ ) { if ( ! strcmp ( s_Name, gs_VipsList[ i ] ) ) return 1; if ( ! strcmp ( s_AuthID, gs_VipsList[ i ] ) ) return 1; } return 0; } stock StripWeapons(id, Type, bool: bSwitchIfActive = true) { new iReturn; if(is_user_alive(id)) { new iEntity, iWeapon; while((iWeapon = GetWeaponFromSlot(id, Type, iEntity)) > 0) iReturn = ham_strip_user_weapon(id, iWeapon, Type, bSwitchIfActive); } return iReturn; } stock GetWeaponFromSlot( id , iSlot , &iEntity ) { if ( !( 1 <= iSlot <= 5 ) ) return 0; iEntity = 0; const m_rgpPlayerItems_Slot0 = 367; const m_iId = 43; const XO_WEAPONS = 4; const XO_PLAYER = 5; iEntity = get_pdata_cbase( id , m_rgpPlayerItems_Slot0 + iSlot , XO_PLAYER ); return ( iEntity > 0 ) ? get_pdata_int( iEntity , m_iId , XO_WEAPONS ) : 0; } stock ham_strip_user_weapon(id, iCswId, iSlot = 0, bool:bSwitchIfActive = true) { new iWeapon if( !iSlot ) { static const iWeaponsSlots[] = { -1, 2, //CSW_P228 -1, 1, //CSW_SCOUT 4, //CSW_HEGRENADE 1, //CSW_XM1014 5, //CSW_C4 1, //CSW_MAC10 1, //CSW_AUG 4, //CSW_SMOKEGRENADE 2, //CSW_ELITE 2, //CSW_FIVESEVEN 1, //CSW_UMP45 1, //CSW_SG550 1, //CSW_GALIL 1, //CSW_FAMAS 2, //CSW_USP 2, //CSW_GLOCK18 1, //CSW_AWP 1, //CSW_MP5NAVY 1, //CSW_M249 1, //CSW_M3 1, //CSW_M4A1 1, //CSW_TMP 1, //CSW_G3SG1 4, //CSW_FLASHBANG 2, //CSW_DEAGLE 1, //CSW_SG552 1, //CSW_AK47 3, //CSW_KNIFE 1 //CSW_P90 } iSlot = iWeaponsSlots[iCswId] } const XTRA_OFS_PLAYER = 5 const m_rgpPlayerItems_Slot0 = 367 iWeapon = get_pdata_cbase(id, m_rgpPlayerItems_Slot0 + iSlot, XTRA_OFS_PLAYER) const XTRA_OFS_WEAPON = 4 const m_pNext = 42 const m_iId = 43 while( iWeapon > 0 ) { if( get_pdata_int(iWeapon, m_iId, XTRA_OFS_WEAPON) == iCswId ) { break } iWeapon = get_pdata_cbase(iWeapon, m_pNext, XTRA_OFS_WEAPON) } if( iWeapon > 0 ) { const m_pActiveItem = 373 if( bSwitchIfActive && get_pdata_cbase(id, m_pActiveItem, XTRA_OFS_PLAYER) == iWeapon ) { ExecuteHamB(Ham_Weapon_RetireWeapon, iWeapon) } if( ExecuteHamB(Ham_RemovePlayerItem, id, iWeapon) ) { user_has_weapon(id, iCswId, 0) ExecuteHamB(Ham_Item_Kill, iWeapon) return 1 } } return 0 } flagul este abc Link to comment Share on other sites More sharing options...
Engine_ShoT 19 Posted August 3, 2016 Author Share Posted August 3, 2016 Nu intelegeti ce zic eu ori cum am gasit acel vip se poate da T/C. Link to comment Share on other sites More sharing options...
Bachkovo 126 Posted August 5, 2016 Share Posted August 5, 2016 A zis se poate da topic closed Link to comment Share on other sites More sharing options...
Recommended Posts