gate not working
#1

Код:
CMD:paytroll(playerid,params[])
{
    	if(IsPlayerInRangeOfPoint(playerid, 8.0,-638.1337,644.5661,16.6300))
		{
	        SetDynamicObjectRot(gate1, 0.000000, 0, 90);
                GivePlayerCash(playerid, -500);
                SendClientMessage(playerid, 0x00FF00AA, "Gate is opening (Auto-closed in 9 sec).");
                SetTimerEx("GateClose", 9000, true,"i",playerid);
                SetDynamicObjectRot(gate1, 0.000000, 0, -90);
		}
}
Gate open correctly , but she doesn't close automatically
((sorry for bad english ))
Reply
#2

Please post your GateClose(playerid) function.

Btw, replace
pawn Код:
SetTimerEx("GateClose", 9000, true,"i",playerid);
With
pawn Код:
SetTimerEx("GateClose", 9000, false,"i",playerid);
So your timer doesn't repeat.
Reply
#3

Nah still open

GateClose(playerid) dosn't have one XD
Reply
#4

Try this:
pawn Код:
CMD:paytroll(playerid,params[])
{
        if(IsPlayerInRangeOfPoint(playerid, 8.0,-638.1337,644.5661,16.6300))
        {
            SetDynamicObjectRot(gate1, 0.000000, 0, -90);
                GivePlayerCash(playerid, -500);
                SendClientMessage(playerid, 0x00FF00AA, "Gate is opening (Auto-closed in 9 sec).");
                SetTimerEx("GateClose", 9000, true,"i",playerid);
        }
}



forward GateClose(playerid);
public GateClose(playerid)
{
    SetDynamicObjectRot(gate1, 0.000000, 0, 90);
    return 1;
}

If the gate still isn't closing try to change the last part in this:
pawn Код:
forward GateClose(playerid);
public GateClose(playerid)
{
    SetDynamicObjectRot(gate1, 0.000000, 0, -90);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)