Santa hat

Discutii despre problemele aparute in jocul Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Mero^
Membru, skill 0
Membru, skill 0
Posts: 89
Joined: 17 Dec 2017, 22:41
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: bromybro1
SteamID: bromybro1
Fond eXtream: 0
Has thanked: 1 time
Contact:

22 Oct 2021, 04:33

hello, i used this plugin in the furien server and i got a problem like the (furien - terrorists) their hats don't hide when they're disappear
| Afiseaza codul
#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 ] );
}

User avatar
GENERALU'
Moderator
Moderator
Posts: 1187
Joined: 27 Jul 2015, 14:35
Detinator Steam: Da
Reputatie: Moderator
Nume anterior: VioreL @EXTREAMCS
Fost Moderator Ajutator
Fond eXtream: 0
Location: Mediaș & Sibiu
Has thanked: 17 times
Been thanked: 11 times

23 Oct 2021, 19:25

put here plugins.ini file please, i don't see where is problem..........
Vand teme WordPress / HTML / Shopify - post2814420.html#p2814420
Eroii NU mor niciodata! Cinste eroilor români! Respect '89
User avatar
Addicted:-
Membru, skill +2
Membru, skill +2
Posts: 874
Joined: 09 Mar 2016, 09:31
Detinator Steam: Da
Fond eXtream: 0
Location: Netherlands
Has thanked: 11 times
Been thanked: 4 times

25 Oct 2021, 16:36

Mero^ wrote:
22 Oct 2021, 04:33
hello, i used this plugin in the furien server and i got a problem like the (furien - terrorists) their hats don't hide when they're disappear
| Afiseaza codul
#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 ] );
}



what are you trying to say with "they're hats don't hide when they disappear"? try this one https://forums.alliedmods.net/showthread.php?t=81172
Image
User avatar
dragonCSX
Membru, skill +1
Membru, skill +1
Posts: 253
Joined: 04 Feb 2017, 17:36
Detinator Steam: Da
CS Status: Scripting AMXX.
Detinator server CS: xmas.legioncs.ro
SteamID: csfweed01
Fond eXtream: 0
Location: Ploiesti
Discord: csfweed01#0001
Has thanked: 4 times
Been thanked: 4 times
Contact:

28 Oct 2021, 12:36

Addicted:- wrote:
25 Oct 2021, 16:36
Mero^ wrote:
22 Oct 2021, 04:33
hello, i used this plugin in the furien server and i got a problem like the (furien - terrorists) their hats don't hide when they're disappear
| Afiseaza codul
#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 ] );
}



what are you trying to say with "they're hats don't hide when they disappear"? try this one https://forums.alliedmods.net/showthread.php?t=81172
se refera la faptul ca palariile inca raman vizibile pentru toti ceilalti dupa ce furien ul devine invizibil.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3347
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: Levin#0061
Has thanked: 40 times
Been thanked: 511 times
Contact:

29 Oct 2021, 21:58

use bb-code '[ code ]' instead of that shit, if u want help :)
Faceți cerere bine detaliată aici și respectând modelul dacă vreți ajutor.
Nu-mi mai dați add doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug la lista de „ignore”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine(STEAM sau PM) dacă aveți o problemă/nelămurire în acest caz! (am cont doar aici!!)
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici, iar dacă sunt ceva probleme sau aveți dvs. probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se va posta la actual, doar dacă se găsește ceva critic/urgent de remediat, fiind coduri vechi, iar unele refăcute recent. NU MAI OFER SUPORT PENTRU ELE!(doar dacă nu e ceva critic/plătit)
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - anunturi/lev-shop-t370037.html
Mero^
Membru, skill 0
Membru, skill 0
Posts: 89
Joined: 17 Dec 2017, 22:41
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: bromybro1
SteamID: bromybro1
Fond eXtream: 0
Has thanked: 1 time
Contact:

29 Oct 2021, 22:34

L E V I N wrote:
29 Oct 2021, 21:58
use bb-code '[ code ]' instead of that shit, if u want help :)
Sorry i didn't know
Post Reply

Return to “Probleme in jocul Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests