Author Topic: Sending a command to player on connect  (Read 1840 times)

How would I make when a client connects , make it use the command "red"

Code: [Select]
package red{
function GameConnection::OnClientEnterGame(%this){
serverCmdred(%this);
}

};


Code: [Select]
package red{
function GameConnection::OnClientEnterGame(%this){
serverCmdred(%this);
}

};

I want it to be when the player connects , not spawns ,
And now I can't Spawn :(

Code: [Select]
package Inaz{
function GameConnection::onConnectRequest(%g,%a,%b,%c,%d,%e,%f)
{
Parent::onConnectRequest(%g,%a,%b,%c,%d,%e,%f);
schedule(2500,0,OnJoin,%g,%a,%b);
}

                function onJoin(%g,%a,%b)
{
if(!isObject(%g))
return;
serverCmdred(%g);
}


};


Code: [Select]
package Inaz{
function GameConnection::onConnectRequest(%g,%a,%b,%c,%d,%e,%f)
{
Parent::onConnectRequest(%g,%a,%b,%c,%d,%e,%f);
schedule(2500,0,OnJoin,%g,%a,%b);
}

                function onJoin(%g,%a,%b)
{
if(!isObject(%g))
return;
serverCmdred(%g);
}


};
activatepackage(Inaz);
try that.

I sworez I had activatepackage already thar...
It wurkz now kthxbai