Fixed it, I forgot to add the remove_ent.
Alright, How do I make it so that all of them are exploded at the same time. My FOR loop didn't work.
Code:
public item_c4det()
{
new arg[32]
read_argv(1,arg,31)
new id = str_to_num(arg)
if(!id) {
client_print(id,print_chat,"[ItemMod] ID1: %i",id)
return PLUGIN_HANDLED
}
client_print(id,print_chat,"[ItemMod] ID2: %i",id)
for(new i = 0; i < 4; i++) {
new entid = find_ent_by_owner(id,"item_c4",id)
//new entid2 = find_ent_by_owner(id,"item_c4",id)
client_print(id,print_chat,"[ItemMod] EntId: %i",entid)
//client_print(id,print_chat,"[ItemMod] EntId2: %i",entid2)
while(entid != 0) {
new origin[3], Float:originF[3];
entity_get_vector(entid,EV_VEC_origin,originF);
FVecIVec(originF,origin);
basic_explosion_c4(origin)
client_print(id,print_chat,"[ItemMod] C4 Successfully Exploded!")
remove_entity(entid)
c4limit[id] -= 1
radius_damage(originF,300,200)
}
}
return PLUGIN_HANDLED
}
Also, what does each one of these lines represent, I seen another topic with a description of these, but the lines didn't match up, so I was confused.
Code:
// A Basic Explosion
stock basic_explosion_c4(origin[3])
{
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 12 )
write_coord(origin[0]) //coord, coord, coord (start)
write_coord(origin[1])
write_coord(origin[2])
write_byte( 200 ) // byte (scale in 0.1's) 188
write_byte( 10 ) // byte (framerate)
message_end()
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 3 )
write_coord(origin[0]) //coord, coord, coord (start)
write_coord(origin[1])
write_coord(origin[2])
write_short( fire )
write_byte( 60 )
write_byte( 10 )
write_byte( 0 )
message_end()
return PLUGIN_HANDLED
}
__________________