Author Topic: Checking Person's Name.  (Read 866 times)

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.

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


Code: [Select]
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.
         }
    }
}

Merci, Shall try not right now though.

If it makes it easyer i want to set there position to the position of a trigger.
« Last Edit: June 07, 2007, 01:38:51 PM by MrPickel »