12/02/2021, 04:41 AM
(Última modificación: 12/02/2021, 06:07 AM por MalitoMaloso. Edited 2 times in total.)
Hola, necesito por favor reparar este error del plugin Piss 2.0 de KRoTaL
[ENGINE] Entity 0 can not be removed
[AMXX] Run time error 10 (plugin "piss.amxx") (native "remove_entity") - debug not enabled!
[AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Si activo el debug el plugin no funciona.
Sé que el error está en esta linea pero no sé como dejar los entities
Gracias
Nevermind, ya lo arregle, dejaré el código acá por si a alguien le sirve
[ENGINE] Entity 0 can not be removed
[AMXX] Run time error 10 (plugin "piss.amxx") (native "remove_entity") - debug not enabled!
[AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Si activo el debug el plugin no funciona.
Sé que el error está en esta linea pero no sé como dejar los entities
Código PHP:
public reset_hud(id)
{
if(task_exists(1481+id))
remove_task(1481+id)
if(task_exists(3424+id))
remove_task(3424+id)
#if !defined NO_CS_CZ
if(task_exists(6794+id))
remove_task(6794+id)
#endif
emit_sound(id,CHAN_VOICE,"piss/pissing.wav", 0.0, ATTN_NORM, 0, PITCH_NORM)
PissFlag[id]=false
new iCurrent
for (new i=1 ; i<count_piss[id] ; i++)
{
iCurrent = find_ent_by_class(-1, "piss_puddle1")
if(iCurrent != -1)
remove_entity(iCurrent)
iCurrent = find_ent_by_class(-1, "piss_puddle2")
if(iCurrent != -1)
remove_entity(iCurrent)
iCurrent = find_ent_by_class(-1, "piss_puddle3")
if(iCurrent != -1)
remove_entity(iCurrent)
iCurrent = find_ent_by_class(-1, "piss_puddle4")
if(iCurrent != -1)
remove_entity(iCurrent)
iCurrent = find_ent_by_class(-1, "piss_puddle5")
if(iCurrent != -1)
remove_entity(iCurrent)
}
count_piss[id]=1
return PLUGIN_CONTINUE
}
Gracias
Nevermind, ya lo arregle, dejaré el código acá por si a alguien le sirve
Código PHP:
while((iCurrent = find_ent_by_class(iCurrent, "piss_puddle1")) > 0)
remove_entity(iCurrent)
while((iCurrent = find_ent_by_class(iCurrent, "piss_puddle2")) > 0)
remove_entity(iCurrent)
while((iCurrent = find_ent_by_class(iCurrent, "piss_puddle3")) > 0)
remove_entity(iCurrent)
while((iCurrent = find_ent_by_class(iCurrent, "piss_puddle4")) > 0)
remove_entity(iCurrent)
while((iCurrent = find_ent_by_class(iCurrent, "piss_puddle5")) > 0)
remove_entity(iCurrent)