Blockland Forums > Modification Help
Script for new player joined
austin615:
What's the function for when a new player joined and when he joins how do I make a image appear on their screen?
Swollow:
--- Code: ---package SpawnMessage
{
function GameConnection::OnClientEnterGame(%client)
{
%client.schedule(500, SendSpawnMessage);
Parent::OnClientEnterGame(%client);
}
function SendSpawnMessage(%client)
{
CenterPrint(%Client,<IMAGE NAME HERE>,4);
}
};
ActivatePackage(SpawnMessage);
--- End code ---
Greek2me:
--- Code: ---package spawnMessage
{
function GameConnection::onClientEnterGame(%client)
{
parent::onClientEnterGame(%client);
%client.schedule(500,centerPrint,"<bitmap:path/to/default/image/here>",4);
}
};
activatePackage(spawnMessage);
--- End code ---
Lugnut:
important note: You can't send a centerprint to people who haven't spawned yet.
Wordy:
--- Quote from: Greek2me on March 01, 2012, 12:43:14 AM ---
--- Code: ---package spawnMessage
{
function GameConnection::onClientEnterGame(%client)
{
parent::onClientEnterGame(%client);
%client.schedule(500,centerPrint,"<bitmap:path/to/default/image/here>",4);
}
};
activatePackage(spawnMessage);
--- End code ---
--- End quote ---
Instead, is their a onSpawn function?