Move Object question
#2

You forgot to add a ")" to
Код:
MoveObject(gate,1545.1000000,-1627.6000000,14.1000000,3;
//See below code
MoveObject(gate,1545.1000000,-1627.6000000,14.1000000,3);
You also forgot to put "return 0;" in OnPlayerCommandText(). Use this instead:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if(strcmp(cmdtext,"/openthegate",true)== 0)
    {
    MoveObject(gate,1545.1000000,-1620.1000000,14.1000000,3);
    return 1;
    }
    if(strcmp(cmdtext,"/closethegate",true)== 0)
    {
    MoveObject(gate,1545.1000000,-1627.6000000,14.1000000,3);
    return 1;
    }
        return 0;
}
In Floats and math overall, there is no need to display "0" if there's not a number afterwars equal to not "0".
Код:
1545.1000000
is the same as
Код:
1545.1
Reply


Messages In This Thread
Move Object question - by Bulgaria - 30.03.2016, 22:05
Re: Move Object question - by introzen - 30.03.2016, 22:11
Re: Move Object question - by Bulgaria - 30.03.2016, 22:18
Re: Move Object question - by Bulgaria - 30.03.2016, 22:20
Re: Move Object question - by Bulgaria - 30.03.2016, 22:37
Re: Move Object question - by introzen - 30.03.2016, 22:55

Forum Jump:


Users browsing this thread: 1 Guest(s)