void main(){
if(openborvariant("in_menuscreen")) // Check if the game is in menu screen
{ counter = setlocalvar("counter",0);
}
if(openborvariant("in_selectscreen")) // Check if the game is in select screen
{
void counter= getlocalvar("counter"); // Set a variable to trigger the spawn on and off
while(counter!=1) // Check the variable to avoid double spawn
{
void subent;
loadmodel("fadeoutwhite"); // name of the entity to be loaded
clearspawnentry(); // clean the spawn entry
setspawnentry("name", "fadeoutwhite"); // define the entity to be spawn
setspawnentry("coords", 50,50,0); // set the position of the entity
subent=spawn(); // spawn the entity
changeentityproperty(subent, "position", 50,50,0); //for safe, set again the position
counter = setlocalvar("counter",1); // turn on the variable, blocking a new spawn to be made
}
}
if(getglobalvar("zoomentity"))
{
zoom();
}
}