MoveDynamicObject
#1

Sorry once again but i've bumped into a error....
I've made my command for the gates
Код:
CMD:mf(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0,324.6000100,-1185.6999500,75.4000000)) {
        if (PlayerOrg[playerid] == 1) {
            if(GateOpen == 0) {
                MoveDynamicObject(gate, 969,318.1000100,-1190.9000200,75.4000000,0.0000000,0.7500000,218.2500000);// OPEN COORDS
                GateOpen = 1;
            }
            else {
                MoveDynamicObject(Gate, 969,324.6000100,-1185.6999500,75.4000000,0.0000000,0.7500000,218.2500000);// CLOSED COORDS
                GateOpen = 0;
            }
        }
        else return 0;
    }
    else {
        SendClientMessage(playerid, COLOR_WHITE, "You are not in range of the gate.");
    }
    return 1;
}
Okay only thing is My gate shows up but when i do /mf
the gate disappears
can anyone help?
Reply
#2

Coords of my gates:
Код:
969,318.1000100,-1190.9000200,75.4000000,0.0000000,0.7500000,218.2500000 // gate open
969,324.6000100,-1185.6999500,75.4000000,0.0000000,0.7500000,218.2500000 // GATE CLOSED
Retrieved these using a MTA Converter
Reply
#3

pawn Код:
CMD:gate(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0,324.6000100,-1185.6999500,75.4000000))//Gate 1
    {
        switch(Open)//Check whether the gate opened or closed
        {
            case true://If the gate opened
            {
                MoveObject(Gate,1428.6456, 242.0033, 20.3020,4);//Close the gate
                Open = false;//false for closed
            }
            case false://If the gate closed
            {
                MoveObject(Gate,1426.5259, 237.4716, 20.3020,4);//Open the gate
                Open = true;//true for opened
            }
        }
        return 1;
    }
    SendClientMessage(playerid,ORANGE,"You're not close enough to the gate.");// Error message
    return 1;
}
I don't use your coordinates, so now you will work on it .
Reply
#4

Quote:
Originally Posted by thegreathom
Посмотреть сообщение
pawn Код:
CMD:gate(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0,324.6000100,-1185.6999500,75.4000000))//Gate 1
    {
        switch(Open)//Check whether the gate opened or closed
        {
            case true://If the gate opened
            {
                MoveObject(Gate,1428.6456, 242.0033, 20.3020,4);//Close the gate
                Open = false;//false for closed
            }
            case false://If the gate closed
            {
                MoveObject(Gate,1426.5259, 237.4716, 20.3020,4);//Open the gate
                Open = true;//true for opened
            }
        }
        return 1;
    }
    SendClientMessage(playerid,ORANGE,"You're not close enough to the gate.");// Error message
    return 1;
}
I don't use your coordinates, so now you will work on it .
fixed it a while ago but thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)