gate close problem
#6

This how i would do it, tested and works:

Код:
new gate6 = 0;
new Gate6Timer;
new impoundgate1;
forward GateClose6();
Код:
public OnGameModeInit()
{
	impoundgate1 = CreateObject(980, 1638.0999755859, -1141.1999511719, 25.700000762939, 0, 0, 358);
}
Код:
public GateClose6()
{
	MoveObject(impoundgate1,1638.0999755859, -1141.1999511719, 25.700000762939, 0.97);
	KillTimer(Gate6Timer);
	gate6 = 0;
	return 1;
}
Код:
	if(!strcmp(cmdtext, "/impound", true))
	{
        if(PlayerInfo[playerid][pJob] != 7)
		{
			SendClientMessage(playerid, COLOR_BLUE,"The impound gate is opened and will close in 7 seconds.");
            SendClientMessage(playerid, COLOR_GREY, "You are not a Car Mechanic!");
            return 1;
        }
        if (IsPlayerInRangeOfPoint(playerid, 15,1638.2725,-1146.0609,23.9063) && gate6 == 0)
		{
            MoveObject(impoundgate1,1638.9386,-1141.2346,36.2896, 0.8);
	      	Gate6Timer = SetTimer("GateClose6", 12000, 0);
	      	gate6 = 1;
            format(string, sizeof(string), "* %s takes out his/her impound remote and opens the gate.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
        }
        else
        {
			SendClientMessage(playerid, COLOR_BLUE,"The impound gate is opened.");
		}
        return 1;
    }
of course fix the spacing.. grrr
Reply


Messages In This Thread
gate close problem - by viddo - 17.02.2012, 21:11
Re: gate close problem - by Darius_Fontaine - 17.02.2012, 21:34
Re: gate close problem - by viddo - 17.02.2012, 21:42
Re: gate close problem - by Nuke547 - 17.02.2012, 21:51
Re: gate close problem - by viddo - 17.02.2012, 22:05
Re: gate close problem - by Darius_Fontaine - 18.02.2012, 00:17

Forum Jump:


Users browsing this thread: 1 Guest(s)