Author Topic: Scripting issue  (Read 1226 times)

I got the player.istantrespawn down fine that was the easy part. I wanted to make that script so I could respawn people when the get deleted from the other script. This respawn script did not work when people got deleted. I believe because the object no longer exist so there is nothing to find. How would I go about making a script to spawn people after the are deleted.

Code: [Select]
function serverCommandRespawnplayer(%client)
{
findclientbyname(%client).instantrespawn
}
That should work, just put it in a script and type /respawnplayer playersname

hmm I will try it but I belive that is what I have already.With a few other options...

Ps::

you forgot the player data in your script

function serverCommandRespawnplayer(%client)
{
findclientbyname(%client).instantrespawn//wheres the player data?
}
« Last Edit: September 16, 2009, 10:51:49 PM by Human Reaper »

function serverCommandRespawnplayer(%client)
{
    findclientbyname(%client).instantrespawn();
}

Thanks i later found out that I was missing the (); had to rethink

function serverCommandRespawnplayer(%client)
{
    findclientbyname(%client).instantrespawn();
}
Erm, I don't know if you did this on purpose, but it looks like you screwed up a serverCmd.

Try this:
Code: [Select]
Function serverCmdRespawn(%client,%name)
{
    %name = findClientByName(%name);
    if(isObject(%name))
    {
        %name.instantRespawn();
    }
}

So you type /Respawn PlayerName

Ok i just tried that out and welll i copied and pasted it and it still did not work. Thanks for trying to help but I am going to stick to one that already works but does not allow me to respawn people when there deleted.Thanks anyways.
« Last Edit: September 16, 2009, 11:46:06 PM by Human Reaper »

You don't use .player bro.