Blockland Forums > Modification Help
function gameconnection::createPlayer(%cl) Gets Stuck at Loading Objects
brickybob:
function gameconnection::createPlayer(%cl) in my script causes me to get stuck at Loading Objects. Is there an alternative to this command? I'm looking for something that will start the script for the client as soon as he spawns.
Edit:
--- Code: ---function getHungry(%cl)
{
%cl.hunger -= 1;
%cl.bottomPrint(%cl.hunger);
schedule(1000, 0, getHungry, %cl);
}
//function gameconnection::createPlayer(%cl)
//function serverCMDstartzmod(%cl)
function GameConnection::spawnPlayer(%this)
{
%cl.hunger = 100;
schedule(1000, 0, getHungry, %cl);
}
function serverCMDhunger(%cl)
{
%cl.bottomPrint(%cl.hunger);
}
--- End code ---
Munkey:
HatMod+ uses spawnPlayer and it seems to work just fine.
--- Code: ---function GameConnection::spawnPlayer(%this)
--- End code ---
otto-san:
pretty sure createPlayer has more arguments than just %cl.
spawnplayer does not.
brickybob:
--- Quote from: Munkey on June 14, 2012, 04:43:38 PM ---HatMod+ uses spawnPlayer and it seems to work just fine.
--- Code: ---function GameConnection::spawnPlayer(%this)
--- End code ---
--- End quote ---
still freezes
probably help if I posted the whole script though :cookieMonster:
Headcrab Zombie:
Package it and call the parent