CreateObject(3114, -810.55603027344, 420.6044921875, 17.095462799072, 0, 0, 180);
CreateObject(3114, -789.43017578125, 420.6044921875, 17.095462799072, 0, 0, 180);
CreateObject(3114, -768.29992675781, 420.6044921875, 17.095462799072, 0, 0, 180);
CreateObject(3114, -747.20837402344, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -726.08239746094, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -704.98468017578, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -683.87829589844, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -662.74847412109, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -641.62139892578, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -620.49261474609, 420.6044921875, 17.099962234497, 0, 0, 180);
CreateObject(3114, -810.5556640625, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -789.4296875, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -768.2998046875, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -747.2080078125, 422.2275390625, 21.699628829956, 49.998779296875, 0, 180);
CreateObject(3114, -726.08203125, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -704.98468017578, 422.2275390625, 21.699628829956, 49.998779296875, 0, 180);
CreateObject(3114, -683.8779296875, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -662.748046875, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -641.62109375, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
CreateObject(3114, -620.4921875, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
// Top of your script ( after includes )
new obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9, obj10;
// GameModeInit
obj1 = CreateObject(3114, -810.55603027344, 420.6044921875, 17.095462799072, 0, 0, 180);
obj2 = CreateObject(3114, -789.43017578125, 420.6044921875, 17.095462799072, 0, 0, 180);
obj3 = CreateObject(3114, -768.29992675781, 420.6044921875, 17.095462799072, 0, 0, 180);
obj4 = CreateObject(3114, -747.20837402344, 420.6044921875, 17.099962234497, 0, 0, 180);
obj5 = CreateObject(3114, -726.08239746094, 420.6044921875, 17.099962234497, 0, 0, 180);
obj6 = CreateObject(3114, -704.98468017578, 420.6044921875, 17.099962234497, 0, 0, 180);
obj7 = CreateObject(3114, -683.87829589844, 420.6044921875, 17.099962234497, 0, 0, 180);
obj8 = CreateObject(3114, -662.74847412109, 420.6044921875, 17.099962234497, 0, 0, 180);
obj9 = CreateObject(3114, -641.62139892578, 420.6044921875, 17.099962234497, 0, 0, 180);
obj10 = CreateObject(3114, -620.49261474609, 420.6044921875, 17.099962234497, 0, 0, 180);
//---------------------------
// at your command
MoveObject( obj1, -810.5556640625, 422.2275390625, 21.699628829956, /*speed*/5.0 );
MoveObject( obj2, -789.4296875, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj3, -768.2998046875, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj4, -747.2080078125, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj5, -726.08203125, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj6, -704.98468017578, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj7, -683.8779296875, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj8, -662.748046875, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj9, -641.62109375, 422.2275390625, 21.699628829956, 5.0 );
MoveObject( obj10, -620.4921875, 422.2275390625, 21.699628829956, 5.0 );
* Basicz is tired.
pawn Код:
Код:
* cruising is tired.
|
// Command
new Float: objPos[ 3 ];
GetObjectPos( obj1, objPos[ 0 ], objPos[ 1 ], objPos[ 2 ] );
MoveObject( obj1, objPos[ 0 ], objPos[ 1 ], objPos[ 2 ] + 5.0 );
/*
+-------------------------------------------------+
| Script created by Gantzyo. |
| |
| You can contact with me in the |
| official post: |
| http://forum.sa-mp.com/index.php?topic=176846.0 |
| |
| Don't delete credits! |
+-------------------------------------------------+
*/
#include <a_samp>
#if defined _G_ObjectsRot_included
#endinput
#endif
#define _G_ObjectsRot_included
#pragma library G_ObjectsRot
#define SERVER_OBJECTS 1000 //1000 is the number of objects in the server
new Float:newrotX[SERVER_OBJECTS];
new Float:newrotY[SERVER_OBJECTS];
new Float:newrotZ[SERVER_OBJECTS];
new Float:odifX[SERVER_OBJECTS];
new Float:odifY[SERVER_OBJECTS];
new Float:odifZ[SERVER_OBJECTS];
new ospeed[SERVER_OBJECTS];
new oTimer[SERVER_OBJECTS];
new oState[SERVER_OBJECTS];
new opoints[SERVER_OBJECTS];
stock RotateObject(objectid,Float:rotX,Float:rotY,Float:rotZ,points,Float:speed)
{
if(oState[objectid] == 1)KillTimer(oTimer[objectid]);
ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round);
oTimer[objectid] = SetTimerEx("RotateObj",ospeed[objectid],0,"dd",objectid,points);
newrotX[objectid] = rotX;
newrotY[objectid] = rotY;
newrotZ[objectid] = rotZ;
new Float:rot[3];
GetObjectRot(objectid,rot[0],rot[1],rot[2]);
odifX[objectid] = (rotX-rot[0])/points;
odifY[objectid] = (rotY-rot[1])/points;
odifZ[objectid] = (rotZ-rot[2])/points;
oState[objectid] = 1;
opoints[objectid] = 0;
return 1;
}
stock SetObjectRotationSpeed(objectid,Float:speed)
{
ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round);
return 1;
}
stock StopRotatingObject(objectid)
{
if(oState[objectid] == 1)KillTimer(oTimer[objectid]);
oState[objectid] = 0;
OnObjectStopRotate(objectid);
return 1;
}
stock GenerateBucle(objectid,Float:offX,Float:offY,Float:offZ,Float:speed)
{
if(oState[objectid] == 1)KillTimer(oTimer[objectid]);
ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round);
oTimer[objectid] = SetTimerEx("RotateObjBucle",ospeed[objectid],0,"d",objectid);
odifX[objectid] = offX;
odifY[objectid] = offY;
odifZ[objectid] = offZ;
oState[objectid] = 1;
return 1;
}
stock StopBucle(objectid)
{
if(oState[objectid] == 1)KillTimer(oTimer[objectid]);
oState[objectid] = 0;
OnObjectStopBucle(objectid);
return 1;
}
forward RotateObj(objectid,points);
public RotateObj(objectid,points)
{
if(oState[objectid] == 0) return 1;
new Float:rot[3];
GetObjectRot(objectid,rot[0],rot[1],rot[2]);
if(newrotX[objectid] != rot[0])rot[0]+=odifX[objectid];
if(newrotY[objectid] != rot[1])rot[1]+=odifY[objectid];
if(newrotZ[objectid] != rot[2])rot[2]+=odifZ[objectid];
SetObjectRot(objectid,rot[0],rot[1],rot[2]);
opoints[objectid]++;
if((newrotX[objectid] != rot[0] || newrotY[objectid] != rot[1] || newrotZ[objectid] != rot[2]) && opoints[objectid] != points)oTimer[objectid] = SetTimerEx("RotateObj",ospeed[objectid],0,"dd",objectid,points);
else {oState[objectid] = 0;OnObjectRotated(objectid);}
return 1;
}
forward RotateObjBucle(objectid);
public RotateObjBucle(objectid)
{
if(oState[objectid] == 0) return 1;
new Float:rot[3];
GetObjectRot(objectid,rot[0],rot[1],rot[2]);
SetObjectRot(objectid,rot[0]+odifX[objectid],rot[1]+odifY[objectid],rot[2]+odifZ[objectid]);
oTimer[objectid] = SetTimerEx("RotateObjBucle",ospeed[objectid],0,"d",objectid);
return 1;
}
forward OnObjectRotated(objectid);
forward OnObjectStopRotate(objectid);
forward OnObjectStopBucle(objectid);
/*
native RotateObject(objectid,Float:rotX,Float:rotY,Float:rotZ,points,Float:speed);
native SetObjectRotationSpeed(objectid,Float:speed);
native StopRotatingObject(objectid);
native GenerateBucle(objectid,Float:offX,Float:offY,Float:offZ,Float:speed)
native StopBucle(objectid);
native OnObjectRotated(objectid);
native OnObjectStopRotate(objectid);
native OnObjectStopBucle(objectid);
*/
Hmmm.... Moving up?
pawn Код:
|
-620.4921875, 422.2275390625, 21.699628829956, 49.998779296875, 0, 179.99450683594);
-620.4921875, 422.2275390625, 21.699628829956);
error 004: function "OnObjectRotated" is not implemented