Author Topic: Set datablock on spawnPlayer?  (Read 473 times)

I want to make a parent function for function GameConnection::spawnPlayer(%client) to set the data block the player uses.. instead of jet pack player i want him to be no jet pack.

Well, first off, the best option for you is probably to use a GameMode. Second, you'd do something like this:
Code: [Select]
package noJets {
function GameConnection::spawnPlayer(%this)
{
%return = parent::spawnPlayer(%this);
%this.player.setDatablock("PlayerNoJet");
return %return;
}
};
activatePackage(noJets);