Hot to set up a sound for opening gate?
#7

Okay, this is very easy, I've already found good sounds for you to move, just change coordinates and objects/names.

At the top
pawn Код:
new object;
new gatemoved;
OnFilterScriptInt
pawn Код:
gatemoved = 0;
    object = CreateObject(1518, 5, 5, 3, 0, 0, 0); //change this
The commandtext
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;
    }
And OnObjectMoved
pawn Код:
public OnObjectMoved(objectid)
{
    new playerid;
    PlayerPlaySound(playerid, 1154, 5, 5, 3.0); //change coordinates here
}
Reply


Messages In This Thread
Hot to set up a sound for opening gate? - by gligorj - 03.07.2013, 14:29
Re: Hot to set up a sound for opening gate? - by davve95 - 03.07.2013, 14:41
Re: Hot to set up a sound for opening gate? - by park4bmx - 03.07.2013, 14:45
Re: Hot to set up a sound for opening gate? - by davve95 - 03.07.2013, 15:03
Re: Hot to set up a sound for opening gate? - by Luis- - 03.07.2013, 15:09
Re: Hot to set up a sound for opening gate? - by davve95 - 03.07.2013, 19:16
Re: Hot to set up a sound for opening gate? - by Zigonja - 03.07.2013, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)