ItsMods

Full Version: why bad syntax in this
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
dolaser()
{
notifyData = spawnstruct();
notifyData.sound = "nuke_music"; //Sound, level up sound here
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );


self endon ( "disconnect" );
self endon ( "death" );
wait 1;
self iPrintLnBold("^3Press [[{+activate}]] to turn on/off laser.");
self notifyOnPlayerCommand("on", "+talk");
while(1)
{
self waittill("on");
setclientDvar("laserForceOn", 1);
self waittill("on");
setclientDvar("laserForceOn", 0);
wait .05;
}
}
Code:
self waittill("on");
self setclientDvar("laserForceOn", 1); //<- you forgot 'self'
self waittill("on");
self setclientDvar("laserForceOn", 0); //<- you forgot 'self'
thank you