Code:
hideandshow()
{
{
self notifyOnPlayerCommand("HHH", "+actionslot 1");
self iPrintLn("Press ^2H ^7 to toggle Hide&Show");
for(;;)
{
self waittill( "HHH" );
self hide();
self waittill( "HHH" );
self show();
self waittill( "HHH" );
self hide();
self waittill( "HHH" );
self show();
}}
else
{}
}
Can i just be told if that above code will work. I want it so a person can toggle between going invisible and coming back by pressing H to toggle it.
If any coders looking mind fixing it if its wrong and tell em wat i did wrong
PS:i made this in 2 secs so donno if correct so plz reply ASAP
EDIT:i get syntax error and yes i added the thing to playerspawn