PHP Code:
function onActionserverside() {
g = findplayer(params[1]);
if (params[0] == "warpto") {
setlevel2(g.level, g.x, g.y);
}
}
//#CLIENTSIDE
...[gui codes blah]...
function SomeWarpButton_onAction() {
triggerserver("gui", this.name, "warpto", this.paccount);
}
FOR EXAMPLE! I rewrote this off my top of my head because im not at home right now but would still like some help.
If i switch to Player1 for example, and warp to them, and walk away, and choose to warpto player2, when i press the button again for player2 it will warp to Player1, when i press it a second time, it warps to player2, even though when i warped the FIRST time, the params said this.paccount was set to Player2.