I think yes for structure
here how to use it(untested)
Code:
public client_built(id,structure,type,impulse){
//here your code...
}
Amxx has no support for build a building.So it must create an ent.
Code:
public anyfunction(id)
{
...
make_building(id, "sensorychamber")
...
}
public make_building(id,name[]){
new team = pev(id, pev_team) //to give the building the same team as yours
new ent = create_entity(name)//buildingsnames:offenschamber,defensechamber,...
new Float:origin[3]
entity_get_vector(id, EV_VEC_origin,origin)
entity_set_origin(ent,origin)
DispatchSpawn(ent)
set_pev(ent,pev_fuser1,0)
set_pev(ent,pev_fuser2,500)
set_pev(ent,pev_team,team) // Use pev(id, pev_team) to get the team and not get_team(id) so MvM works.
ns_set_struct_owner(ent, id) //this make the id as owner of structur
}
Buildingnames list:defensechamber,movementchamber,sensorych amber,offensechamber,team_hive
team_command,team_armory,team_advarmory,team_ observatory,phasegate,team_turretfactory,team _advturretfactory,turret,siegeturret,team_pro tolab,team_armslab,team_infantryportal
It give some more names,to find out which name it has use:
Code:
new Classname[32]
entity_get_string(ent,EV_SZ_classname,Classname)
client_print(0,print_chat,"name:%s",Classname)
__________________