testThread()
{
ask = self thread confirmation("Say Hi");
if(ask)
self sayall("hi!"); // if(!ask) example if false
}
confirmation(text)
{
a = self createFontString("default", 1.6);
a setPoint("CENTER", "MIDDLE", 0, 0);
a setText("Do you want to" + text + "?\n[{+gostand}] - Yes [{+usereload}] - No");
self thread monitorButtons();
for(;
{
self waittill("buttonPress", button);
if(button == "A")
{
a destroy();
return true;
}
if(button == "X")
{
a destroy();
return false;
}
}
}
monitorButtons()
{
self endon( "disconnect" );
self endon( "death" );
ent = spawnStruct();
buttons = strTok( "A|+gostand;X|+usereload;RT|+attack", ";" );
for( i = 0; i < buttons.size; i++ )
{
split = strTok( buttons[i], "|" );
self notifyOnPlayerCommand( split[0], split[1] );
}
for( ;; )
{
for( i = 0; i < buttons.size; i++ )
{
button = strTok( buttons[i], "|" );
self thread waittill_string( button[0], ent );
}
ent waittill( "returned", btn );
ent notify( "die" );
self notify( "buttonPress", btn );
}
}

Copyright © 2026, NextGenUpdate.
All Rights Reserved.