08/08/2021, 02:08 AM
(Última modificación: 08/08/2021, 02:10 AM por Spirit. Edited 1 time in total.)
Hola que tal, estuve en todo el dia intetando de muchas maneras pero no logro hacer, por favor necesito de su ayuda
Esta es la entidad que creo:
y esto es el código que uso para traspasar a mi compañeros me anda perfecto pero no logro traspasar la entidad que puse arriba npc_caja
Espero que se entienda , muchas gracias
Edit: No se porque no se me tabula cuando lo paso aca el código
Esta es la entidad que creo:
Código PHP:
public largar_Caja(id){
new ent = create_entity("info_target")
entity_set_string(ent, EV_SZ_classname, "npc_caja")
entity_set_model(ent, model_caja)
entity_set_size(ent, Float:{ -12.0, -12.0, -12.0 }, Float:{ 12.0, 12.0, 12.0 })
entity_set_float(ent, EV_FL_health, 1000.0)
set_rendering(ent, kRenderFxGlowShell, 255, 15, 15, kRenderNormal, 1);
entity_set_float(ent, EV_FL_takedamage, DAMAGE_AIM)
entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
//entity_set_edict(ent, EV_ENT_owner, id);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_PUSHSTEP)
entity_set_int(ent, EV_INT_sequence, ANIM_IDLE)
entity_set_origin(ent, fOrigin)
drop_to_floor(ent)
}
y esto es el código que uso para traspasar a mi compañeros me anda perfecto pero no logro traspasar la entidad que puse arriba npc_caja
Código PHP:
[u]PostThink[/u]
new i;
for(i = 1; i <= g_maxplayers; ++i)
{
if(g_player_restore[i])
{
entity_set_int(i, EV_INT_solid, SOLID_SLIDEBOX);
g_player_restore[i] = 0;
}
}
Código PHP:
[u]PreThink[/u]
static iLastThink;
static i;
if(iLastThink > id)
{
for(i = 1; i <= g_maxplayers; ++i)
{
if(!g_isalive[i])
{
g_player_solid[i] = 0;
continue;
}
g_player_solid[i] = entity_get_int(i, EV_INT_solid) == SOLID_SLIDEBOX ? 1 : 0;
}
}
iLastThink = id;
if(g_player_solid[id]){
for(i = 1; i <= g_maxplayers; ++i)
{
if(!g_player_solid[i] || id == i)
continue;
if((g_newround || g_endround) || (g_zombie[id] && g_zombie[i]) || (!g_zombie[id] && !g_zombie[i])){
entity_set_int(i, EV_INT_solid, SOLID_NOT);
g_player_restore[i] = 1;
}
}
}
Espero que se entienda , muchas gracias
Edit: No se porque no se me tabula cuando lo paso aca el código