Quote:
Originally Posted by cbk1994
Something like this is generally preferable to the above as it's not using old Gscript. Note that it will only work online.
PHP Code:
function onCreated() {
this.dontBlock();
}
//#CLIENTSIDE
function onCreated() {
this.dontBlock();
this.drawOverPlayer();
if (lighteffectsenabled) {
this.setColorEffect(0, 1, 0, 0.8); // red, green, blue, alpha
} else {
this.hide();
}
}
Give it an image (usually light2.png or light3.png).
|
Not really that important especially with it only being an example but just for the sake of giving others the idea, if you are using dontblock serverside you don't need to be using it clientside, the same would also apply with drawoverplayer and most of the variable setting functions as the data is synchronised.
In theory it's better to have all of these serverside in the event of it being a static (motionless for example) NPC such as a light, this way it's only the specific variables being sent to clients rather than the script itself, which involves less data transfer.