This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
functions:isserver [2017/03/17 22:36] – created korshun | functions:isserver [2017/06/19 21:16] – korshun | ||
---|---|---|---|
Line 17: | Line 17: | ||
<note important> | <note important> | ||
+ | |||
+ | <note warning>'' | ||
===== Examples ===== | ===== Examples ===== | ||
Line 29: | Line 31: | ||
// Draw hud, spawn effects. | // Draw hud, spawn effects. | ||
} | } | ||
+ | </ | ||
+ | |||
+ | Use it to verify that serverside code is not run clientside, while not breaking singleplayer: | ||
+ | < | ||
+ | if (!IsServer()) | ||
+ | error(" | ||
</ | </ |