COMMAND:startevent(playerid, params[])
{
foreach(new i : Platplayers)
{
TogglePlayerControllable(i, 1);
GameTextForPlayer(i, "EVENT STARTED!", 5000, 5);
}
for(new i; i < MAX_PLAT; i++)
{
MoveObject(Object1[i], ObjectOne[i][0] + 8, ObjectOne[i][1], ObjectOne[i][2], 5.0);
}
for(new i; i < MAX_PLATTWO; i++)
{
MoveObject(Object2[i], ObjectTwo[i][0] - 8, ObjectTwo[i][1], ObjectTwo[i][2], 5.0);
}
for(new i; i < MAX_PLATTHREE; i++)
{
MoveObject(Object3[i], ObjectThree[i][0], ObjectThree[i][1], ObjectThree[i][2] - 6, 5.0);
}
Object_1_State = 1;
return true;
}
public OnObjectMoved(objectid)
{
if(Object_1_State == 1)
{
for(new i; i < MAX_PLAT; i++)
MoveObject(Object1[i], ObjectOne[i][0] - 8, ObjectOne[i][1], ObjectOne[i][2], 5.0);
for(new i; i < MAX_PLATTWO; i++)
MoveObject(Object2[i], ObjectTwo[i][0] + 8, ObjectTwo[i][1], ObjectTwo[i][2], 5.0);
for(new i; i < MAX_PLATTHREE; i++)
MoveObject(Object3[i], ObjectThree[i][0], ObjectThree[i][1], ObjectThree[i][2] + 6, 5.0);
Object_1_State = 0;
}
else
{
for(new i; i < MAX_PLAT; i++)
MoveObject(Object1[i], ObjectOne[i][0] + 8, ObjectOne[i][1], ObjectOne[i][2], 5.0);
for(new i; i < MAX_PLATTWO; i++)
MoveObject(Object2[i], ObjectTwo[i][0] - 8, ObjectTwo[i][1], ObjectTwo[i][2], 5.0);
for(new i; i < MAX_PLATTHREE; i++)
MoveObject(Object3[i], ObjectThree[i][0], ObjectThree[i][1], ObjectThree[i][2] - 6, 5.0);
Object_1_State = 1;
}
#if defined mo_OnObjectMoved
return mo_OnObjectMoved(objectid);
#else
return 1;
#endif
}
#if defined _ALS_OnObjectMoved
#undef OnObjectMoved
#else
#define _ALS_OnObjectMoved
#endif
#define OnObjectMoved mo_OnObjectMoved
#if defined mo_OnObjectMoved
forward mo_OnObjectMoved(objectid);
#endif
[warning] client exceeded 'ackslimit' 93.91.151.102:60757 (10423) Limit: 6000/sec
[warning] client exceeded 'ackslimit' 109.64.124.171:55558 (15883) Limit: 6000/sec [warning] client exceeded 'ackslimit' 109.64.124.171:55561 (7432) Limit: 6000/sec [warning] client exceeded 'ackslimit' 1.186.37.96:59472 (8534) Limit: 6000/sec PHP код:
|
#define MAX_PLAT 4
#define MAX_PLATTWO 4
#define MAX_PLATTHREE 4
new Object1[MAX_PLAT];
new Object2[MAX_PLATTWO];
new Object3[MAX_PLATTHREE];
new Float:ObjectOne[MAX_PLAT][3] = {
{-584.67676, 1546.93774, 73.44270},//1
{-584.02399, 1571.70898, 73.44270},//1
{-583.30975, 1595.83289, 73.44270},//1
{-582.62518, 1619.84558, 73.44270}//1
};
new Float:ObjectTwo[MAX_PLATTWO][3] = {
{-583.54565, 1587.48474, 73.44270},//2
{-584.25311, 1563.81213, 73.44270},//2
{-584.90430, 1538.83606, 73.44270},//2
{-582.86426, 1612.07227, 73.44270}//2
};
new Float:ObjectThree[MAX_PLATTHREE][3] = {
{-583.04523, 1603.86938, 73.44270},//3
{-583.81067, 1579.42664, 73.44270},//3
{-584.43677, 1555.34583, 73.44270},//3
{-585.10431, 1530.79614, 73.44270}//3
};