Santa hat

Discutii despre problemele aparute in jocul Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Mero^
Membru, skill +1
Membru, skill +1
Posts: 132
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: 4 times
Been thanked: 3 times
Contact:

22 Oct 2021, 05: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 ] );
}

RoyalServer
User avatar
GENERALU'
Membru, skill +3
Membru, skill +3
Posts: 1276
Joined: 27 Jul 2015, 15:35
Detinator Steam: Da
CS Status: dproto.dll
Detinator server CS: biohazard is comming
SteamID: generalu_extream
Reputatie: Fost Moderator
Nume anterior: VioreL @EXTREAMCS
Fond eXtream: 0
Location: Transilvania
Discord: generalu_extream2463
Has thanked: 57 times
Been thanked: 19 times

23 Oct 2021, 20:25

put here plugins.ini file please, i don't see where is problem..........
User avatar
Addicted:-
Membru, skill +2
Membru, skill +2
Posts: 873
Joined: 09 Mar 2016, 09:31
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 13 times
Been thanked: 3 times

25 Oct 2021, 17:36

Mero^ wrote:
22 Oct 2021, 05: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
User avatar
dragonCSX
Membru, skill +1
Membru, skill +1
Posts: 281
Joined: 04 Feb 2017, 17:36
Detinator Steam: Da
CS Status: moneymaker.
Detinator server CS: xmas.arenadevils.ro
SteamID: csfweed01
Fond eXtream: 0
Location: Ploiesti
Discord: csfweed1337
Has thanked: 8 times
Been thanked: 7 times
Contact:

28 Oct 2021, 13:36

Addicted:- wrote:
25 Oct 2021, 17:36
Mero^ wrote:
22 Oct 2021, 05: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.
>> XMAS.ARENADEVILS.RO # See you again in 2025 <<
>> DR.ARENADEVILS.RO # Official Deathrun Mod 2024 <<
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3854
Joined: 24 Aug 2011, 12:24
Detinator Steam: Nu
CS Status:
Detinator server CS: ☯∴
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 595 times
Contact:

29 Oct 2021, 22:58

use bb-code '[ code ]' instead of that shit, if u want help :)
Nu îmi mai trimiteți PM pe forum! Nu merge să răspund
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Mero^
Membru, skill +1
Membru, skill +1
Posts: 132
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: 4 times
Been thanked: 3 times
Contact:

29 Oct 2021, 23:34

L E V I N wrote:
29 Oct 2021, 22: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 48 guests