Help with gate
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/gateopen", cmdtext, true, 10) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,4.0,2705.8347167969, 657.30255126953, 11.070308685303))
        {
            MoveObject(mygate,2705.8347167969, 657.30255126953, 11.070308685303,3.0);
            SendClientMessage(playerid,0xFFFF00FF,"You have just opened the Yard gate");
            return 1;
        }
                else return SendClientMessage(playerid, 0xFFFF00FF, "You are not in range of point");
    }
    if (strcmp("/gateclose", cmdtext, true, 10) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,4.0,2706.0078125, 652.048828125, 11.070308685303))
        {
            MoveObject(mygate,2706.0078125, 652.048828125, 11.070308685303,3.0);
            SendClientMessage(playerid,0xFFFF00FF,"You have just closed the Yard gate");
            return 1;
        }
             else return SendClientMessage(playerid, 0xFFFF00FF, "You are not in range of point");
    }
}
It should work
Reply


Messages In This Thread
Help with gate - by zack3021 - 02.09.2010, 14:15
Re: Help with gate - by mmrk - 02.09.2010, 14:22
Re: Help with gate - by CyNiC - 02.09.2010, 14:23
Re: Help with gate - by zack3021 - 02.09.2010, 14:25
Re: Help with gate - by zack3021 - 02.09.2010, 16:15
Re: Help with gate - by Vince - 02.09.2010, 16:17
Re: Help with gate - by CyNiC - 02.09.2010, 16:25
Re: Help with gate - by zack3021 - 02.09.2010, 20:27

Forum Jump:


Users browsing this thread: 2 Guest(s)