Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*
- NORIA 0.3/FerrisWheel 0.3
- Créditos/Credits: Versión antigua/Old version: Backwardsman97 Nueva versión/New version: adri1
- NORIA 0.1/FerrisWheel 0.1 por/by Backwardsman97: http://forum.sa-mp.com/showthread.php?t=78317
- */
- forward Rotacion();
- new Radios1[20];
- new Radios2[20];
- new Cabinas[20];
- new Luces[20];
- new Objetos[8];
- public OnFilterScriptInit()
- {
- Objetos[0] = CreateObject(1391, 1946.39, 1533.88, 32.59, 35.00, 0.00, 0.00);
- Objetos[1] = CreateObject(1391, 1946.60, 1519.14, 32.59, -35.00, 0.00, 0.00);
- Objetos[2] = CreateObject(1391, 1946.64, 1526.56, 33.43, 0.00, 0.00, 0.00);
- Objetos[3] = CreateObject(1391, 1938.01, 1526.94, 33.43, 0.00, 0.00, 0.00);
- Objetos[4] = CreateObject(1391, 1937.96, 1519.45, 32.59, -35.00, 0.00, 0.00);
- Objetos[5] = CreateObject(1391, 1937.99, 1534.36, 32.59, 35.00, 0.00, 0.00);
- Objetos[6] = CreateObject(8832, 1942.31, 1530.94, 11.08, 0.00, 3.00, 90.00);
- Objetos[7] = CreateObject(8832, 1942.29, 1503.70, 11.19, 0.00, -3.00, 90.00);
- new Float:y,Float:z,Float:dis,Float:Rot;
- Radios1[0] = CreateObject(3398,1943.8535,1526.9259,55.33241,0,Rot,270);
- for(new i=1; i<19; i++)
- {
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion((Rot -= 18.9),y,z,14.09467);
- dis = floatsqroot(((1526.9259 - y) * (1526.9259 - y)) + ((z - 55.33241) * (z - 55.33241)));
- Radios1[i] = CreateObject(3398,1943.8535,y,z-dis,0,Rot,270);
- }
- Rot = 0;
- Radios2[0] = CreateObject(3398,1940.8535,1526.9259,55.33241,0,Rot,270);
- Cabinas[0] = CreateObject(18879, 1942.39, 1526.85, 66.19, 0.00, 0.00, 90.00);
- Luces[0] = CreateObject(354, 1942.39, 1526.85, 66.19, 0.00, 0.00, 90.00);
- for(new i=1; i<19; i++)
- {
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion((Rot -= 18.9),y,z,14.09467);
- dis = floatsqroot(((1526.9259 - y) * (1526.9259 - y)) + ((z - 55.33241) * (z - 55.33241)));
- Radios2[i] = CreateObject(3398,1940.8535,y,z-dis,0,Rot,270);
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion(Rot,y,z,28.18934);
- Cabinas[i] = CreateObject(18879, 1942.39,y,z-dis,0,0,90.00);
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion(Rot,y,z,28.18934);
- Luces[i] = CreateObject(354, 1942.39,y,z-dis,0,0,90.00);
- }
- SetTimer("Rotacion",50,1);//In english: Rotation
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i; i<20; i++)
- {
- DestroyObject(Radios1[i]);
- DestroyObject(Radios2[i]);
- DestroyObject(Cabinas[i]);
- DestroyObject(Luces[i]);
- DestroyObject(Objetos[i]);
- }
- return 1;
- }
- public Rotacion()
- {
- new Float:y,Float:y2,Float:z,Float:dis;
- for(new i=0; i<19; i++)
- {
- //MoverRadioPrimario/MoveFirstSpoke
- GetObjectRot(Radios1[i],y2,y2,z);
- SetObjectRot(Radios1[i],0,y2-=0.25,270);
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion(y2,y,z,14.09467);
- dis = floatsqroot(((1526.9259 - y) * (1526.9259 - y)) + ((z - 55.33241) * (z - 55.33241)));
- SetObjectPos(Radios1[i],1943.8535,y,z-dis);
- //MoverRadioSecundario/MoveSecondSpoke
- GetObjectRot(Radios2[i],y2,y2,z);
- SetObjectRot(Radios2[i],0,y2-=0.25,270);
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion(y2,y,z,14.09467);
- dis = floatsqroot(((1526.9259 - y) * (1526.9259 - y)) + ((z - 55.33241) * (z - 55.33241)));
- SetObjectPos(Radios2[i],1940.8535,y,z-dis);
- //MoverCabinas/MovePlatforms
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion(y2+0.2,y,z,24.18934);
- SetObjectPos(Cabinas[i],1942.39,y,z-dis);
- //MoverLuces/MoveLights
- y=1526.9259; z=55.33241;
- ObtDirecXYDePosicion(y2+0.2,y,z,24.18934);
- SetObjectPos(Luces[i],1942.39,y,z-dis);
- }
- return 1;
- }
- stock ObtDirecXYDePosicion(Float:direction, &Float:x, &Float:y, Float:dist)
- {
- x += (dist * floatsin(-direction, degrees));
- y += (dist * floatcos(-direction, degrees));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement