Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock ScreenFade_Carica(playerid)// Da inserire su OnPlayerConnect
- {
- Background[playerid] = CreatePlayerTextDraw(playerid, 320, 0, "_");
- PlayerTextDrawUseBox(playerid, Background[playerid], 1);
- PlayerTextDrawLetterSize(playerid, Background[playerid], 1.0, 49.6);
- PlayerTextDrawTextSize(playerid, Background[playerid], 1.0, 640);
- PlayerTextDrawBoxColor(playerid, Background[playerid], 0x00000000);
- PlayerTextDrawAlignment(playerid, Background[playerid], 2);
- return 1;
- }
- stock ScreenFade(playerid) // Funzione
- {
- SetTimerEx("FadeOut", DELAY, false, "id", playerid, 0);
- return 1;
- }
- forward FadeOut(playerid, A); // Trasparenza da 0 a totale
- public FadeOut(playerid, A)
- {
- PlayerTextDrawBoxColor(playerid, Background[playerid], RGBToHex(0,0,0,A));
- PlayerTextDrawShow(playerid, Background[playerid]);
- if (A == 255) SetTimerEx("FadeOut", DELAY, false, "id", playerid, A+1);
- else if( A == 0) SetTimerEx("FadeIn", DELAY, false, "id", playerid, 255);
- return 1;
- }
- forward FadeIn(playerid, A); // Trasparenza da 255 a 0
- public FadeIn(playerid, A)
- {
- PlayerTextDrawBoxColor(playerid, Background[playerid], RGBToHex(0,0,0,A));
- PlayerTextDrawShow(playerid, Background[playerid]);
- if(A > 1) SetTimerEx("FadeIn", DELAY, false, "id", playerid, A-1);
- else PlayerTextDrawHide(playerid, Background[playerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment