03-08-2012, 01:49
How i can stop the loop?
if i have 2000 credits the loop will make -4x500 Money
if i have 0 Credits.
i tryed with "break;" but dont work.
if i have 2000 credits the loop will make -4x500 Money
if i have 0 Credits.
i tryed with "break;" but dont work.
Quote:onMenuResponse()
{
self endon( "death" );
self endon( "disconnect" );
while( true )
{
self waittill( "menuresponse", menu, response );
if( response == "l96" )
{
if(self.money >= 500)
{
self.money-=500;
self.hud_score_value setValue(self.money);
self giveWeapon( "l96a1_mp" );
self switchToWeapon( "l96a1_mp" );
self thread ScoreHUD( -500);
self iPrintln("L96 purchased");
}
}