Witam mam takie pytanie gdyz tworze 3 enty z innym classname. No i musze zrobic tak:
if(spawn[1]){
origin[0] = -2063.0;
origin[1] = -797.0;
origin[2] = 164.0;
entity_set_string(ent, EV_SZ_classname, "ent_1");
entity_set_int(ent, EV_INT_solid, SOLID_NOT);
entity_set_vector(ent, EV_VEC_origin, origin);
entity_set_model(ent, "sprites/xx.spr");
drop_to_floor(ent);
spawn[1] = false;
}
else if(spawn[2]){
origin[0] = -1671.0;
origin[1] = -389.0;
origin[2] = 164.0;
entity_set_string(ent, EV_SZ_classname, "ent_2");
entity_set_int(ent, EV_INT_solid, SOLID_NOT);
entity_set_vector(ent, EV_VEC_origin, origin);
entity_set_model(ent, "sprites/xx2.spr");
drop_to_floor(ent);
spawn[2] = false;
}
else if(spawn[3]){
origin[0] = -1636.0;
origin[1] = -869.0;
origin[2] = 164.0;
entity_set_string(ent, EV_SZ_classname, "ent_3");
entity_set_int(ent, EV_INT_solid, SOLID_NOT);
entity_set_vector(ent, EV_VEC_origin, origin);
entity_set_model(ent, "sprites/xx3.spr");
drop_to_floor(ent);
spawn[3] = false;
}
I gdy bym chcial utworzyc wiecej to zajmuje duzo liniejk i czasu na kopiuj wklej aby tylko classname sie zmienil.
Czy istnieje mozliwosc aby classname mozna bylo pobrac z tablicy ??
Jezeli tak to prosilbym o przykladowy kod.


Dodatki SourceMod




Temat jest zamknięty











