Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Use e abuse retire os creditos q nao tem kkkkkk
- faça o que quiser flw*/
- #include <a_samp>
- enum pInfo
- {
- bool:SpawnDance,
- Float:SpawnAngle,
- SpawnTimer
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new ClosedSelection[MAX_PLAYERS];
- new Float:cordinatex,Float:cordinatey,Float:cordinatez,Float:cordinateangle;
- new Float:RequestCamera[10][4] =
- { //PosX PosY PosZ PosAngulo
- {2750.9370,-2233.9905,61.7276,236.9652},
- {1296.4391,1583.2622,50.2969,317.8491},
- {1054.8481,1019.7778,57.3438,95.0108}, //troque esssa posiçoes para quais vc
- {1452.0229,750.9430,32.6900,88.4309}, // quiser
- {2213.8701,1679.2406,57.3038,91.4144},
- {746.1910,740.3755,29.1076,24.4488},
- {199.7275,1393.2085,47.8297,179.5663},
- {596.4931,1502.9486,9.0578,29.4318},
- {-207.8227,1901.1121,128.4624,68.0533},
- {-2387.3440,2401.0579,20.7627,240.9129}
- };
- forward MoveCamera(playerid,rand);
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" [FS] Camera em movimento. ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(ClosedSelection[playerid] == 0)
- {
- new rand = random(sizeof(RequestCamera));
- cordinatex = RequestCamera[rand][0];
- cordinatey = RequestCamera[rand][1];
- cordinatez = RequestCamera[rand][2];
- cordinateangle = RequestCamera[rand][3];
- SetPlayerPos(playerid,cordinatex,cordinatey,cordinatez);
- SetPlayerFacingAngle(playerid, cordinateangle);
- SetPlayerCameraPos(playerid,cordinatex+(3.8*floatsin(-cordinateangle,degrees)),cordinatey+(3.8*floatcos(-cordinateangle,degrees)),cordinatez);
- SetPlayerCameraLookAt(playerid, cordinatex,cordinatey,cordinatez);
- PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238);
- if(PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", 50, true, "i", playerid);
- PlayerInfo[playerid][SpawnDance] = false;
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE2);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PlayerInfo[playerid][SpawnDance] = true;
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE2);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- ClosedSelection[playerid] = 0;
- PlayerInfo[playerid][SpawnAngle] = 0.0;
- PlayerInfo[playerid][SpawnDance] = true;
- KillTimer(PlayerInfo[playerid][SpawnTimer]);
- PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
- SetCameraBehindPlayer(playerid);
- SetPlayerSkin(playerid, 23);
- return 1;
- }
- public MoveCamera(playerid,rand)
- {
- SetPlayerCameraPos(playerid, cordinatex - 2 * floatsin(-PlayerInfo[playerid][SpawnAngle], degrees), cordinatey - 10 * floatcos(-PlayerInfo[playerid][SpawnAngle], degrees), cordinatez + 3);
- SetPlayerCameraLookAt(playerid, cordinatex, cordinatey, cordinatez + 0.5);
- PlayerInfo[playerid][SpawnAngle] += 0.5;
- if(PlayerInfo[playerid][SpawnAngle] >= 360.0)
- PlayerInfo[playerid][SpawnAngle] = 0.0;
- }
Advertisement
Add Comment
Please, Sign In to add comment