Move problem help
#6

I assume that the SendClientMessage is inside the following code:


pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1653.9000244141, -3886.1000976563, -5.9000000953674))
    {
       
           MoveDynamicObject(bus, 1653.9000244141, -3886.1000976563, 9, 2.5);
            SetTimerEx("Close",7000,false,"i", 0);
            }


        }
And that gets called every 1.5 seconds which means it will spam the message every 1.5 seconds aswell.

However there is an easy fix for this. you could simply do like this:

pawn Код:
new bool:block;
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1653.9000244141, -3886.1000976563, -5.9000000953674) && block == false)
    {
           
           block = true;
           MoveDynamicObject(bus, 1653.9000244141, -3886.1000976563, 9, 2.5);
            SetTimerEx("Close",7000,false,"i", 0);
            }


        }
This would pretty much make a block that would hinder spam. It simply allows it to call the function once before it blocks it.

And then you add another IsPlayerInRage of point on the other side of the bridge which would set the block to false if you require it to detect you once more.

I hope I helped.
Reply


Messages In This Thread
Move problem help - by [LHT]Bally - 10.05.2012, 18:45
Re: Move problem help - by ViniBorn - 10.05.2012, 18:53
Re: Move problem help - by [LHT]Bally - 10.05.2012, 19:00
Re: Move problem help - by [LHT]Bally - 10.05.2012, 19:27
Re: Move problem help - by [LHT]Bally - 10.05.2012, 21:25
Re: Move problem help - by CrazyGab - 10.05.2012, 22:13
Re: Move problem help - by [LHT]Bally - 11.05.2012, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)