View Single Post
  #16  
Old 05-23-2008, 01:45 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Here's an example on how to use attachplayer, I use it on Mythic and it works flawless. I've cut out some parts though - but should contain the information you need.

PHP Code:
function onPlayerTouchsMe()
{
  if (
player.x in |x3| && player.y in |37|) {
    if (!
player.attached && player.dir == 3player.attachPlayerToObj(0id);
    else if (
player.attached && (player.dir == || player.attached && player.dir == 2) && player.x in |x+1|) detachPlayer();
  }

  else if (
player.x in |2021| && player.y in |37|) {
    if (!
player.attached && player.dir == 1attachPlayerToObj(0id);
    else if (
player.attached && player.dir == 3detachPlayer();
  }
}

//#CLIENTSIDE
function onCreated()
{
  
// SET SHAPE HERE

__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote