Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- // Teleport Fade Screen like GTA CW 1.3 by O.K.Style
- new Iter[MAX_PLAYERS], Text:BlackScreen[6], Text:R[2], Text:Star;
- public OnFilterScriptInit()
- {
- BlackScreen[0] = TextDrawCreate(642.0, 1.0, "~n~");
- TextDrawLetterSize(BlackScreen[0], 0.5, 49.5);
- TextDrawUseBox(BlackScreen[0], 1);
- TextDrawBoxColor(BlackScreen[0], 0x000000AA);
- TextDrawTextSize(BlackScreen[0], -2.0, 0.0);
- BlackScreen[1] = TextDrawCreate(642.0, 1.0, "~n~");
- TextDrawLetterSize(BlackScreen[1], 0.5, 49.5);
- TextDrawUseBox(BlackScreen[1], 1);
- TextDrawBoxColor(BlackScreen[1], 0x000000BB);
- TextDrawTextSize(BlackScreen[1], -2.0, 0.0);
- BlackScreen[2] = TextDrawCreate(642.0, 1.0, "~n~");
- TextDrawLetterSize(BlackScreen[2], 0.5, 49.5);
- TextDrawUseBox(BlackScreen[2], 1);
- TextDrawBoxColor(BlackScreen[2], 0x000000CC);
- TextDrawTextSize(BlackScreen[2], -2.0, 0.0);
- BlackScreen[3] = TextDrawCreate(642.0, 1.0, "~n~");
- TextDrawLetterSize(BlackScreen[3], 0.5, 49.5);
- TextDrawUseBox(BlackScreen[3], 1);
- TextDrawBoxColor(BlackScreen[3], 0x000000DD);
- TextDrawTextSize(BlackScreen[3], -2.0, 0.0);
- BlackScreen[4] = TextDrawCreate(642.0, 1.0, "~n~");
- TextDrawLetterSize(BlackScreen[4], 0.5, 49.5);
- TextDrawUseBox(BlackScreen[4], 1);
- TextDrawBoxColor(BlackScreen[4], 0x000000EE);
- TextDrawTextSize(BlackScreen[4], -2.0, 0.0);
- BlackScreen[5] = TextDrawCreate(642.0, 1.0, "~n~");
- TextDrawLetterSize(BlackScreen[5], 0.5, 49.5);
- TextDrawUseBox(BlackScreen[5], 1);
- TextDrawBoxColor(BlackScreen[5], 0x000000FF);
- TextDrawTextSize(BlackScreen[5], -2.0, 0.0);
- R[0] = TextDrawCreate(591.0, 406.0, "R");
- TextDrawFont(R[0], 1);
- TextDrawLetterSize(R[0], 1.46, 3.8);
- TextDrawColor(R[0], 0xFFFFFFFF);
- R[1] = TextDrawCreate(591.0, 406.0, "R");
- TextDrawFont(R[1], 1);
- TextDrawLetterSize(R[1], 1.46, 3.8);
- TextDrawColor(R[1], 0xFFFFFFAA);
- TextDrawSetProportional(R[1], 1);
- Star = TextDrawCreate(615.0, 428.0, "]");
- TextDrawBackgroundColor(Star, 0xFFFFFFFF);
- TextDrawFont(Star, 2);
- TextDrawLetterSize(Star, 0.64, 1.8);
- TextDrawColor(Star, 0x000000FF);
- TextDrawSetOutline(Star, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i; i < sizeof(BlackScreen); i++)
- {
- TextDrawHideForAll(BlackScreen[i]);
- TextDrawDestroy(BlackScreen[i]);
- }
- for(new i; i < sizeof(R); i++)
- {
- TextDrawHideForAll(R[i]);
- TextDrawDestroy(R[i]);
- }
- TextDrawHideForAll(Star);
- TextDrawDestroy(Star);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/tp", true) == 0)
- {
- SetPlayerPosCW(playerid, 1000.0, 2000.0, 10.0);
- return 1;
- }
- return 0;
- }
- forward TeleportCW(playerid, Float:x, Float:y, Float:z);
- public TeleportCW(playerid, Float:x, Float:y, Float:z)
- {
- if(Iter[playerid] > 0)
- {
- switch(Iter[playerid])
- {
- case 16:
- {
- ApplyAnimation(playerid, "ped", "Run_Wuzi", 1, 0, 1, 1, 1, 1);
- }
- case 8:
- {
- ApplyAnimation(playerid, "PED", "WALK_DOORPARTIAL", 1, 0, 1, 1, 1, 1);
- }
- case 6:
- {
- TextDrawShowForPlayer(playerid, BlackScreen[0]);
- TextDrawShowForPlayer(playerid, R[0]);
- TextDrawShowForPlayer(playerid, Star);
- }
- case 5:
- {
- TextDrawHideForPlayer(playerid, R[0]);
- TextDrawShowForPlayer(playerid, R[1]);
- TextDrawHideForPlayer(playerid, BlackScreen[0]);
- TextDrawShowForPlayer(playerid, BlackScreen[1]);
- }
- case 4:
- {
- TextDrawHideForPlayer(playerid, R[1]);
- TextDrawShowForPlayer(playerid, R[0]);
- TextDrawHideForPlayer(playerid, BlackScreen[1]);
- TextDrawShowForPlayer(playerid, BlackScreen[2]);
- }
- case 3:
- {
- TextDrawHideForPlayer(playerid, R[0]);
- TextDrawShowForPlayer(playerid, R[1]);
- TextDrawHideForPlayer(playerid, BlackScreen[2]);
- TextDrawShowForPlayer(playerid, BlackScreen[3]);
- }
- case 2:
- {
- TextDrawHideForPlayer(playerid, R[1]);
- TextDrawShowForPlayer(playerid, R[0]);
- TextDrawHideForPlayer(playerid, BlackScreen[3]);
- TextDrawShowForPlayer(playerid, BlackScreen[4]);
- }
- case 1:
- {
- TextDrawHideForPlayer(playerid, R[0]);
- TextDrawShowForPlayer(playerid, R[1]);
- TextDrawHideForPlayer(playerid, BlackScreen[4]);
- TextDrawShowForPlayer(playerid, BlackScreen[5]);
- }
- }
- Iter[playerid] -= 1;
- SetTimerEx("TeleportCW", 100, 0, "ifff", playerid, x, y, z);
- }
- else if(Iter[playerid] == 0)
- {
- TextDrawHideForPlayer(playerid, BlackScreen[5]);
- TextDrawHideForPlayer(playerid, R[1]);
- TextDrawHideForPlayer(playerid, Star);
- ClearAnimations(playerid);
- SetPlayerPos(playerid, x, y, z);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- stock SetPlayerPosCW(playerid, Float:x, Float:y, Float:z)
- {
- ClearAnimations(playerid);
- Iter[playerid] = 16;
- SetTimerEx("TeleportCW", 100, 0, "ifff", playerid, x, y, z);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement