Hello,
I'm french, sorry for my english
There is my code to create a block:
new i = 0;
for(i = 0; i < crates; i++) {
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_wall"));
if(!pev_valid(ent)) continue;
dllfunc(DLLFunc_Spawn, ent);
new Float:mins[3] = { -32.0, -32.0, -32.0 }, Float:maxs[3] = { 32.0, 32.0, 32.0 };
engfunc(EngFunc_SetSize, ent, mins, maxs);
engfunc(EngFunc_SetOrigin, ent, crate_origin[a]);
engfunc(EngFunc_SetModel, ent, MDL_CRATE);
set_pev(ent, pev_classname, "ccrate");
set_pev(ent, pev_health, 9999.0);
set_pev(ent, pev_movetype, MOVETYPE_FLY);
set_pev(ent, pev_solid, SOLID_BBOX);
set_pev(ent, pev_angles, { 0.0, 180.0, 0.0 });
set_pev(ent, pev_mins, mins);
set_pev(ent, pev_maxs, maxs);
set_pev(ent, pev_owner, 33);
set_pev(ent, pev_iuser1, 0);
}
The box is created but not solid (semi solid), i jump over there and i "cross ?" them...
PS: why "EngFunc_SetSize" don't set mins and maxs? when:
pev(ent, pev_mins, cmin);
server_print("%f %f %f", cmin[0], cmin[1], cmin[2]); // return "0.0 0.0 0.0" ?
Once again, sorry for my english