03.07.2013, 20:11
Okay, this is very easy, I've already found good sounds for you to move, just change coordinates and objects/names.
At the top
OnFilterScriptInt
The commandtext
And OnObjectMoved
At the top
pawn Код:
new object;
new gatemoved;
pawn Код:
gatemoved = 0;
object = CreateObject(1518, 5, 5, 3, 0, 0, 0); //change this
pawn Код:
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
if(gatemoved == 0)
{
PlayerPlaySound(playerid, 1153, 5, 5, 3.0); //change coordinates here
MoveObject(object, 1, 1, 3, 2); //change coordinates here
gatemoved = 1;
}
else if(gatemoved == 1)
{
PlayerPlaySound(playerid, 1153, 5, 5, 3.0); //change coordinates here
MoveObject(object, 5, 5, 3, 2); //change coordinates here
gatemoved = 0;
}
return 1;
}
pawn Код:
public OnObjectMoved(objectid)
{
new playerid;
PlayerPlaySound(playerid, 1154, 5, 5, 3.0); //change coordinates here
}