Blockland Forums > Modification Help

Checking Person's Name.

Pages: (1/1)

MrPickle:

How do you make it do something like this:

MrPickle:/Move Fred

O <-- Fred was there an now he's here --> O
Things i tried Asking how to do:

Making the person in the Message the victim. (Fred)
Moving People.


Game master pro:

It would be a servercmd so you can use it as a slash.



--- Code: ---function serverCmdMove(%name)
{
     for(%i = 0; %i < ClientGroup.getCount(); %i++) //Go through all clients, find  one matching the name
    {
    %cl.ClientGroup.getObject(%i);
    if(%cl.name $= %name) { //If a name match has been found
        %trans = %cl.player.getTransform(); //get the position and other things about the player
//Here you put your stuff for moving it, i think it's just getting the position out of the transform, editing it to the new position, and //resetting it.
         }
    }
}

--- End code ---


MrPickle:

Merci, Shall try not right now though.

If it makes it easyer i want to set there position to the position of a trigger.

Pages: (1/1)

Go to full version