OnClientEnterGame
function GameConnection::onClientEnterGame(%this){%this.mtki = "m";}
You need to call the parent. And onClientEnterGame is only when they spawn for the first time.
Also: How do you map a key for one person olny?
$dscale = "0.5";$spawnyes = 1;function setscaleofguy(%client){echo("Okay.");%client.player.setplayerscale($dscale);}package kat {function GameConnection::onClientEnterGame(%this){if($spawnyes == 1){$ST = schedule(500,0, setscaleofguy,%this);}}};activatepackage(kat);
Code: [Select]$dscale = "0.5 0.5 0.5";$spawnyes = 1;function setscaleofguy(%client){ echo("Okay."); %client.player.setScale($dscale);}package kat{ function GameConnection::onClientEnterGame(%this) { if($spawnyes == 1) { schedule(500,0, setscaleofguy,%this); } } Parent::onClientEnterGame(%this)};activatepackage(kat);...Didn't work either.
$dscale = "0.5 0.5 0.5";$spawnyes = 1;function setscaleofguy(%client){ echo("Okay."); %client.player.setScale($dscale);}package kat{ function GameConnection::onClientEnterGame(%this) { if($spawnyes == 1) { schedule(500,0, setscaleofguy,%this); } } Parent::onClientEnterGame(%this)};activatepackage(kat);
Both scripts are missing Parent::onClientEnterGame(%this);
First of all its setScale(%vector); not setplayerscale($vector);. %vector should be 3 sets of numbers so I will fix up what I see wrong. Also, organize your codes more, this is a mess. My code SHOULD work, but no guarantees. You make your code so much more complicated than it should be, also, this will only work the first time they spawn, not every time.
Ok, SetPlayerScale works then, my bad. And I forgot to parent, woops. Added Parent to my script.