Help with gate
#1

I want my gate to be able to open only when the player is in rang of it.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/gateopen", cmdtext, true, 10) == 0)
	{
		MoveObject(mygate,2705.8347167969, 657.30255126953, 11.070308685303,3.0);
		SendClientMessage(playerid,0xFFFF00FF,"You have just opened the Yard gate");
		return 1;
	}
	if (strcmp("/gateclose", cmdtext, true, 10) == 0)
	{
		MoveObject(mygate,2706.0078125, 652.048828125, 11.070308685303,3.0);
		SendClientMessage(playerid,0xFFFF00FF,"You have just closed the Yard gate");
		return 1;
	}
 	else
 	{
 	    SendClientMessage(playerid,0xFF0000FF,"You are too far to open the gate");
 		return 0;
	}
}
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: 1 Guest(s)