Mód elejére:
new Text:LOADING_SCREEN_IMG1;
new Text:LOADING_SCREEN_IMG2;
new Text:LOADING_SCREEN_IMG3;
new Text:LOADING_SCREEN_IMG4;
new Text:LOADING_SCREEN_IMG5;
new Text:LOADING_SCREEN_IMG6;
OnGameModeInit/OnFiltersciptInIt -be:
LOADING_SCREEN_IMG1 = TextDrawCreate(0.000000, 0.000000, \"loadsc3:loadsc3\");
TextDrawBackgroundColor(LOADING_SCREEN_IMG1, 255);
TextDrawFont(LOADING_SCREEN_IMG1, 4);
TextDrawLetterSize(LOADING_SCREEN_IMG1, 0.500000, 1.000000);
TextDrawColor(LOADING_SCREEN_IMG1, -1);
TextDrawSetOutline(LOADING_SCREEN_IMG1, 0);
TextDrawSetProportional(LOADING_SCREEN_IMG1, 1);
TextDrawSetShadow(LOADING_SCREEN_IMG1, 1);
TextDrawUseBox(LOADING_SCREEN_IMG1, 1);
TextDrawBoxColor(LOADING_SCREEN_IMG1, 255);
TextDrawTextSize(LOADING_SCREEN_IMG1, 663.000000, 482.000000);
LOADING_SCREEN_IMG2 = TextDrawCreate(0.000000, 0.000000, \"loadsc8:loadsc8\");
TextDrawBackgroundColor(LOADING_SCREEN_IMG2, 255);
TextDrawFont(LOADING_SCREEN_IMG2, 4);
TextDrawLetterSize(LOADING_SCREEN_IMG2, 0.500000, 1.000000);
TextDrawColor(LOADING_SCREEN_IMG2, -1);
TextDrawSetOutline(LOADING_SCREEN_IMG2, 0);
TextDrawSetProportional(LOADING_SCREEN_IMG2, 1);
TextDrawSetShadow(LOADING_SCREEN_IMG2, 1);
TextDrawUseBox(LOADING_SCREEN_IMG2, 1);
TextDrawBoxColor(LOADING_SCREEN_IMG2, 255);
TextDrawTextSize(LOADING_SCREEN_IMG2, 663.000000, 482.000000);
LOADING_SCREEN_IMG3 = TextDrawCreate(0.000000, 0.000000, \"loadsc1:loadsc1\");
TextDrawBackgroundColor(LOADING_SCREEN_IMG3, 255);
TextDrawFont(LOADING_SCREEN_IMG3, 4);
TextDrawLetterSize(LOADING_SCREEN_IMG3, 0.500000, 1.000000);
TextDrawColor(LOADING_SCREEN_IMG3, -1);
TextDrawSetOutline(LOADING_SCREEN_IMG3, 0);
TextDrawSetProportional(LOADING_SCREEN_IMG3, 1);
TextDrawSetShadow(LOADING_SCREEN_IMG3, 1);
TextDrawUseBox(LOADING_SCREEN_IMG3, 1);
TextDrawBoxColor(LOADING_SCREEN_IMG3, 255);
TextDrawTextSize(LOADING_SCREEN_IMG3, 663.000000, 482.000000);
LOADING_SCREEN_IMG4 = TextDrawCreate(0.000000, 0.000000, \"loadsc9:loadsc9\");
TextDrawBackgroundColor(LOADING_SCREEN_IMG4, 255);
TextDrawFont(LOADING_SCREEN_IMG4, 4);
TextDrawLetterSize(LOADING_SCREEN_IMG4, 0.500000, 1.000000);
TextDrawColor(LOADING_SCREEN_IMG4, -1);
TextDrawSetOutline(LOADING_SCREEN_IMG4, 0);
TextDrawSetProportional(LOADING_SCREEN_IMG4, 1);
TextDrawSetShadow(LOADING_SCREEN_IMG4, 1);
TextDrawUseBox(LOADING_SCREEN_IMG4, 1);
TextDrawBoxColor(LOADING_SCREEN_IMG4, 255);
TextDrawTextSize(LOADING_SCREEN_IMG4, 663.000000, 482.000000);
LOADING_SCREEN_IMG5 = TextDrawCreate(0.000000, 0.000000, \"loadsc12:loadsc12\");
TextDrawBackgroundColor(LOADING_SCREEN_IMG5, 255);
TextDrawFont(LOADING_SCREEN_IMG5, 4);
TextDrawLetterSize(LOADING_SCREEN_IMG5, 0.500000, 1.000000);
TextDrawColor(LOADING_SCREEN_IMG5, -1);
TextDrawSetOutline(LOADING_SCREEN_IMG5, 0);
TextDrawSetProportional(LOADING_SCREEN_IMG5, 1);
TextDrawSetShadow(LOADING_SCREEN_IMG5, 1);
TextDrawUseBox(LOADING_SCREEN_IMG5, 1);
TextDrawBoxColor(LOADING_SCREEN_IMG5, 255);
TextDrawTextSize(LOADING_SCREEN_IMG5, 663.000000, 482.000000);
LOADING_SCREEN_IMG6 = TextDrawCreate(0.000000, 0.000000, \"loadsc14:loadsc14\");
TextDrawBackgroundColor(LOADING_SCREEN_IMG6, 255);
TextDrawFont(LOADING_SCREEN_IMG6, 4);
TextDrawLetterSize(LOADING_SCREEN_IMG6, 0.500000, 1.000000);
TextDrawColor(LOADING_SCREEN_IMG6, -1);
TextDrawSetOutline(LOADING_SCREEN_IMG6, 0);
TextDrawSetProportional(LOADING_SCREEN_IMG6, 1);
TextDrawSetShadow(LOADING_SCREEN_IMG6, 1);
TextDrawUseBox(LOADING_SCREEN_IMG6, 1);
TextDrawBoxColor(LOADING_SCREEN_IMG6, 255);
TextDrawTextSize(LOADING_SCREEN_IMG6, 663.000000, 482.000000);
Mód végére:
forward BACKGROUND_SCREENS(playerid);
public BACKGROUND_SCREENS(playerid)
{
new rand = random(6);
if(rand == 0)
{
TextDrawShowForPlayer(playerid,LOADING_SCREEN_IMG1);
}
if(rand == 1)
{
TextDrawShowForPlayer(playerid,LOADING_SCREEN_IMG2);
}
if(rand == 2)
{
TextDrawShowForPlayer(playerid,LOADING_SCREEN_IMG3);
}
if(rand == 3)
{
TextDrawShowForPlayer(playerid,LOADING_SCREEN_IMG4);
}
if(rand == 4)
{
TextDrawShowForPlayer(playerid,LOADING_SCREEN_IMG5);
}
if(rand == 5)
{
TextDrawShowForPlayer(playerid,LOADING_SCREEN_IMG6);
}
return 1;
}
Ezután használhatod bárhol:
BACKGROUND_SCREENS(playerid);
Például ha azt akarod hogy akkor jelenjen meg a játékosnak ha csatlakozott a szerveredre:
public OnPlayerConnect(playerid)
{
BACKGROUND_SCREENS(playerid);
return 1;
}
Így mindíg véletlenszerûen kirak egy képet a játékosnak.