Ajutor Plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Click* ;x
Membru, skill 0
Membru, skill 0
Posts: 38
Joined: 26 Jan 2016, 22:09
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: ZM PLAY-ARENA RO
SteamID: stancu.silvian
Fond eXtream: 0
Contact:

05 Jan 2018, 12:32

Salutare , am si eu un server de cs mod zombie plague 6.3 , si vreau sa pun doar la CT , caciuli de craciun daca puteti sa puneti cu glow color pe ele. Am eu niste caciuli daca puteti sa mi le modificati sa fie doar pentru CT. Nu si zombie. doar Humanii sa aiba caciulile . Uitati pluginu:

Code: Select all

#include < amxmodx >
#include < engine >
#include < cstrike >
#include < hamsandwich >

new const g_szHatModel[ CsTeams ][ ] = {
	"",
	"models/make/santa_capt.mdl",
	"models/make/santa_capct.mdl",
	""
};

new g_iHats[ 33 ];

public plugin_init( ) {
	register_plugin( "Santa Hat + Snow", "1.3", "xPaw" );
	
	register_cvar( "santa_hat", "1.3", FCVAR_SERVER );
	
	register_event( "TeamInfo", "EventTeamInfo", "a" );
	
	RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
}

public plugin_precache( ) {
	create_entity( "env_snow" );
	
	precache_model( g_szHatModel[ CS_TEAM_T ] );
	precache_model( g_szHatModel[ CS_TEAM_CT ] );
}

public client_disconnect( id )
	if( is_valid_ent( g_iHats[ id ] ) )
	remove_entity( g_iHats[ id ] );

public FwdHamPlayerSpawn( const id ) {
	if( is_user_alive( id ) ) {
		new iEntity = g_iHats[ id ];
		
		if( !is_valid_ent( iEntity ) ) {
			if( !( iEntity = g_iHats[ id ] = create_entity( "info_target" ) ) )
				return;
			
			new CsTeams:iTeam = cs_get_user_team( id );
			
			if( iTeam != CS_TEAM_T && iTeam != CS_TEAM_CT )
				iTeam = CS_TEAM_T;
			
			entity_set_model( iEntity, g_szHatModel[ iTeam ] );
			entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FOLLOW );
			entity_set_edict( iEntity, EV_ENT_aiment, id );
		}
	}
}

public EventTeamInfo( ) {
	new id = read_data( 1 ), iEntity = g_iHats[ id ];
	
	if( !is_valid_ent( iEntity ) ) {
		if( iEntity > 0 )
			g_iHats[ id ] = 0;
		
		return;
	}
	
	new szTeam[ 2 ];
	read_data( 2, szTeam, 1 );
	
	if( szTeam[ 0 ] == 'C' )
		entity_set_model( iEntity, g_szHatModel[ CS_TEAM_CT ] );
	else
		entity_set_model( iEntity, g_szHatModel[ CS_TEAM_T ] );
}

RoyalServer 2
User avatar
Derek
Membru, skill +1
Membru, skill +1
Posts: 198
Joined: 19 Nov 2014, 18:16
Detinator Steam: Da
CS Status: CsBlackDevil.Com
Detinator server CS: ZM
Fond eXtream: 0
Location: Romania
Has thanked: 1 time
Contact:

05 Jan 2018, 13:18

Man, nu ai o limita in a cere incontinuu sa-ti modifice cineva pluginurile?

Oamenii astia fac totul pe gratis, mai cu simt ca tu faci 5 cereri pe saptamana.
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5138
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 4 times
Been thanked: 46 times

06 Jan 2018, 03:10

| Afiseaza codul
#include < amxmodx >
#include < engine >
#include < cstrike >
#include < hamsandwich >
#include < zombieplague >

new const g_szHatModel[ CsTeams ][ ] = {
	"",
	"models/xmas/37_santa_hat_red.mdl",
	"models/xmas/37_santa_hat_blue.mdl",
	""
};

new g_iHats[ 33 ];

public plugin_init( ) {
	register_plugin( "Santa Hat + Snow", "1.3", "xPaw" );
	
	register_cvar( "santa_hat", "1.3", FCVAR_SERVER );
	
	register_event( "TeamInfo", "EventTeamInfo", "a" );
	
	RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
}

public plugin_precache( ) {
	create_entity( "env_snow" );
	
	precache_model( g_szHatModel[ CS_TEAM_T ] );
	precache_model( g_szHatModel[ CS_TEAM_CT ] );
}

public client_disconnect( id )
	if( is_valid_ent( g_iHats[ id ] ) )
	remove_entity( g_iHats[ id ] );

public FwdHamPlayerSpawn( const id ) {
	if( is_user_alive( id ) ) {
		new iEntity = g_iHats[ id ];
		
		if( !is_valid_ent( iEntity ) ) {
			if( !( iEntity = g_iHats[ id ] = create_entity( "info_target" ) ) )
				return;
			
			new CsTeams:iTeam = cs_get_user_team( id );
			
			if( iTeam != CS_TEAM_T && iTeam != CS_TEAM_CT )
				iTeam = CS_TEAM_T;
			
			set_rendering(iEntity, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 16)
			entity_set_model( iEntity, g_szHatModel[ iTeam ] );
			entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FOLLOW );
			entity_set_edict( iEntity, EV_ENT_aiment, id );
		}
	}
}

public zp_user_infected_pre( id ) {
	
	if( is_valid_ent( g_iHats[ id ] ) )
		remove_entity( g_iHats[ id ] ); 
}


public EventTeamInfo( ) {
	new id = read_data( 1 ), iEntity = g_iHats[ id ];
	
	if( !is_valid_ent( iEntity ) ) {
		if( iEntity > 0 )
			g_iHats[ id ] = 0;
		
		return;
	}
	
	new szTeam[ 2 ];
	read_data( 2, szTeam, 1 );
	
	if( szTeam[ 0 ] == 'C' )
		entity_set_model( iEntity, g_szHatModel[ CS_TEAM_CT ] );
	else
		entity_set_model( iEntity, g_szHatModel[ CS_TEAM_CT ] );
}
Post Reply

Return to “Cereri”

  • Information