Quote:
Originally Posted by fowlplay4
You need to tell the server to warp the player, which is done easily with triggeraction. Since this is just a level npc, you can do it like this:
PHP Code:
function onCreated() {
// Gives NPC shape to be 'hit' with triggeractions on the server-side.
setshape(1, 32, 32);
}
function onActionWarpPlayer() {
player.setlevel2("onlinestartlocal.nw", 30, 30);
}
//#CLIENTSIDE
function onPlayerTouchsMe() {
triggeraction(this.x + 1, this.y, + 1, "WarpPlayer", "");
}
Your duplicate code can also be redone with a for loop.
|
Do you know how much i love you? <3 Thanks. EDIT : NVM! EDIT x2: NVM TAT NVM I LOVE U!
PHP Code:
function onActionWarpPlayer() {
player.setlevel2("express_boat-storm2.nw",36.5,18);
}
//#CLIENTSIDE
function onCreated()
{
setshape(1,32,32);
}
function onPlayerTouchsMe()
{
if(client.quest1=4)
{
triggeraction(this.x + 1, this.y, + 1, "WarpPlayer", "");
setani("sleep",NULL);
client.quest1=5;
}
}
it still no work! but setting client.quest1 works perfectly...