Hi all!
I'm trying to make it so when I press the L key a box is spawned. I'm editing the zombie mod, in _rank.gsc. I have the following the code:
Code:
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self thread doSpawn();
if ( self isHost() )
{
self thread docbox();
}
}
}
docbox()
{
for ( ;; )
{
self waittill( "L" );
self thread maps\mp\gametypes\_hud_message::hintMessage("CREATING BOX!");
origin = self.origin;
cbox( origin, ( 89, 0, 0 ) );
}
}
cbox( pos, angle )
{
block = spawn( "script_model", pos );
block setModel( "com_plasticcase_friendly" );
block.angles = angle;
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}
But whenever I press L nothing happens? No text, no box, no nothing? Any ideas what I'm doing wrong? Thanks for any help!