If it's below the //#CLIENTSIDE line, it's clientside.
If it's above the //#CLIENTSIDE line, it's serverside.
To do things in the serverside, you have to send a triggeraction.
The syntax is triggeraction 0,0,serverside,WEAPON NAME,params;
This calls (actionserverside).
And if you care about security..
It's only insecure if you're sending the level and x/y it's going to warp you to from the serverside.
NPC Code:
//INSECURE
if (actionserverside) {
if (strequals(#p(0),warp)) {
setlevel2 #p(1),strtofloat(#p(2)),strtofloat(#p(3));
}
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Warper,warp,onlinestartlocal.nw,30, 30;
}
NPC Code:
//SECURE
if (actionserverside) {
if (strequals(#p(0),warp)) {
setlevel2 onlinestartlocal.nw,30,30;
}
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Warper,warp;
}
With the first example, a hacker can modify the level and x/y it warps you to easily.
With the second example, they can't modify the level and x/y it warps you to.