L 11/22/2020 - 11:59:28: [AMXX] Displaying debug trace (plugin "menu.amxx", version "1.0")
L 11/22/2020 - 11:59:28: [AMXX] Run time error 10: native error (native "entity_set_model")
L 11/22/2020 - 11:59:28: [AMXX] [0] 601d43af8f91f759bc53895a7785a79b.sma::FwdHamPlayerSpawn (line 360)
L 11/22/2020 - 11:59:28: [AMXX] [1] 601d43af8f91f759bc53895a7785a79b.sma::christmashat_handler (line 258)
Code: Select all
public FwdHamPlayerSpawn(const id)
{
if (!(get_user_flags(id) & VIP_FLAG)) return 0;
if(is_user_alive(id))
{
new iEntity = g_iHats[id]
if (!(checkHS1 == 0)) {
if( pev_valid( iEntity ) )
engfunc( EngFunc_RemoveEntity, g_iHats[id]);
}
new CsTeams:iTeam
if( pev_valid( iEntity ) && g_iHats[id] > 0){
engfunc( EngFunc_RemoveEntity, g_iHats[id] );
g_iHats[id] = 0;
}
if (checkHS3 == 0){
iTeam = cs_get_user_team(id)
if(!(iEntity = g_iHats[id] = create_entity("info_target")))
entity_set_model( iEntity, g_szHatModel[ iTeam ] );
entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FOLLOW );
entity_set_edict( iEntity, EV_ENT_aiment, id );
}else {
if (!(checkHS2 == 0))
iTeam = checkHS2 == 0 ? CS_TEAM_CT : 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 );
}
}
}
[code]
nu merge sa sterg sau sa schimb modelul, nu inteleg de ce. mai sus e linia 360 si aici 258:
case 2: {
if (checkHS1 == 0 )
ColorChat (id, GREEN, "^x04[%s]^x01 Christmas hat is disabled!", tag)
if (checkHS3 == 1){
checkHS3 = 0
FwdHamPlayerSpawn(id);
ColorChat(id, GREEN, "^x04[%s]^x01 Teammode color disabled!", tag)
} else {
checkHS3 = 1
FwdHamPlayerSpawn(id);
ColorChat(id, GREEN, "^x04[%s]^x01 Teammode color enabled!", tag)
}
christmashat(id);
}