Nu merge Plugins vip

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
Sp1ke.Yt
Membru, skill 0
Membru, skill 0
Posts: 81
Joined: 19 Dec 2018, 00:57
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Da
Fond eXtream: 0
Contact:

16 Feb 2019, 12:06

salut am plugins asta de vip pe sv e mod DR scriu /vmenu si nu imi deschide meniu de ce?
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta_util>

#define PLUGIN "Vip wIN"
#define VERSION "1.0"
#define AUTHOR "c0stY*"



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_clcmd("say /vmenu", "Powermenu", ADMIN_LEVEL_H,"")
	register_clcmd( "say /powers","Powermenu", ADMIN_LEVEL_H,"")
 
        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, "\w[Dr]\yViata.", "1", 0 )
    menu_additem( menu, "\w[Dr]\yViteza.", "2", 0 )
    menu_additem( menu, "\w[Dr]\yGravitate.", "3",0 )
    menu_additem( menu, "\w[Dr]\yAk47 +\rM4a1 + \yDeagle", "4",0 )
    menu_additem( menu, "\w[Dr]\yRifles \r[\rArme \ytari].", "5",0 )
    menu_additem( menu, "\w[Dr]\yShiels.", "6",0 )
    menu_additem( menu, "\w[Dr]\yPachet grenazi.", "7",0 )
    menu_additem( menu, "\w[Dr]\yMachine Guns \r[5.9]", "8",0 )
    menu_additem( menu, "\w[Dr]\yViteza normala.", "9",0 )
    menu_additem( menu, "\w[Dr]\yArmura." , "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_user_health(id,800)
        
        }
        case 1:
        {
                set_pev( id,pev_maxspeed, 1200.0)
                set_user_maxspeed(id,1200.0)		
                client_cmd(id,"cl_forwardspeed 1200.0")
                client_cmd(id,"cl_backspeed 1200.0")                
                client_cmd(id,"cl_sidespeed 1200.0")
        }
        case 2:
        {
                set_pev( id, pev_gravity, 0.3125);
		
        }
        case 3:
        {

		give_item(id,"weapon_ak47")
		cs_set_user_bpammo(id, CSW_AK47, 250);
		give_item(id,"weapon_m4a1")
		cs_set_user_bpammo(id, CSW_M4A1, 250 );
		give_item(id,"weapon_deagle") 
		cs_set_user_bpammo(id, CSW_DEAGLE, 250 );
        }
        case 4:
        {
		give_item(id,"weapon_ak47")
		cs_set_user_bpammo(id, CSW_AK47, 250);
		give_item(id,"weapon_m4a1")
		cs_set_user_bpammo(id, CSW_M4A1, 250 );
		give_item(id,"weapon_deagle") 
		cs_set_user_bpammo(id, CSW_DEAGLE, 250 );
                give_item(id,"weapon_famas")
                cs_set_user_bpammo(id, CSW_FAMAS, 250 );
		give_item(id,"weapon_awp")
		cs_set_user_bpammo(id, CSW_AWP, 250 );
		give_item(id,"weapon_mp5navy")
		cs_set_user_bpammo(id, CSW_MP5NAVY, 250 );
		give_item(id,"weapon_ump45") 
		cs_set_user_bpammo(id, CSW_UMP45, 250 );
		give_item(id,"weapon_galil")
		cs_set_user_bpammo(id, CSW_GALIL, 250 );
		give_item(id,"weapon_scout") 
		cs_set_user_bpammo(id, CSW_SCOUT, 250 );
		give_item(id,"weapon_aug")
		cs_set_user_bpammo(id, CSW_AUG, 250 );
		give_item(id,"weapon_sg550")
		cs_set_user_bpammo(id, CSW_SG550, 250 );
        }
        case 5:
        {
		StripWeapons(id, Primary)
		give_item(id,"weapon_shield")

		
        }
        case 6:
        {
		give_item(id, "weapon_hegrenade")
                cs_set_user_bpammo(id, CSW_HEGRENADE, 8 );
		give_item(id, "weapon_flashbang")
		give_item(id, "weapon_flashbang")
		give_item(id, "weapon_smokegrenade")
                cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 8 );
        }
        case 7:
        {
		give_item(id,"weapon_m249")
		cs_set_user_bpammo(id, CSW_M249, 300 );
                
        }
        case 8:
        {
		set_pev( id,pev_maxspeed, 350.0)
                set_user_maxspeed(id,350.0)		
                client_cmd(id,"cl_forwardspeed 350.0")             
                client_cmd(id,"cl_backspeed 350.0")            
                client_cmd(id,"cl_sidespeed 350.0")
        }
        case 9:
        {
		set_user_armor(id,800)
                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
                        1  //CSW_SHIELD
		}
		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
}
IG-BOOST.org - Instagram Followers Best, Cheap, Reliable
User avatar
Laurentiu P.
Super moderator
Super moderator
Posts: 2477
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Super moderator
Nume anterior: Do[N]e ;3
Location: Constanta
Has thanked: 2 times
Been thanked: 1 time

16 Feb 2019, 16:00

ai instalat pe server unul din pluginurile:

Code: Select all

ghostchat.amxx
allchat.amxx
rankadminchat.amxx
sau orice alt plugin ce modifica chatul?
Image
glmmlg
Membru, skill +1
Membru, skill +1
Posts: 151
Joined: 14 Feb 2014, 06:16
Detinator Steam: Da
Detinator server CS: Da
Location: Timisoara
Has thanked: 1 time
Contact:

18 Feb 2019, 20:42

Pai ai fisierul VIPS.ini ? si admin cu acces ADMIN_LEVEL_H
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests