Quote:
|
Originally Posted by MichielM
i saw somebody used code to edit the function of a door. i only dont know how this actualy works, so maybe someone can give me a little help.
im running a rp mod (harbu) on the map mecklenburg_final. now when i start the server i notice that all the doors that should be closed, are open.
i know there is a way to edit the function, i only dont know how to code it.
this is wat i saw someone use it to edit the function
Code:
new doorentbuf = get_maxplayers()
new dinerdoor = 282 + doorentbuf
DispatchKeyValue(dinerdoor, "spawnflags", "32")
DispatchKeyValue(dinerdoor, "movesnd", "9")
DispatchKeyValue(dinerdoor, "wait", "-1")
DispatchKeyValue(dinerdoor, "doormaterial", "1")
DispatchSpawn(dinerdoor)
set_entity_health(dinerdoor,-10000.0)
now this code should edit the "dinnerdoor" with the entid "282" ??
how can i say that the door has to be closed on server start?
also when i make a "new hospitaldoor" as example, it says "Hospital is never used before" of whatever 
|
You can't just say "new hospitaldoor", you need to spawn it. And yes, dinnerdoor is 282 + maxplayers, because for each player, every other ent is pushed up 1 id.
And you can just do force_use.
__________________