IsPlayerInRangeOfPoint - Problem
#4

That is because you are setting the timer when they are near the gates.

pawn Код:
public PortGates(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 20, 2400.6038,-2266.5767,13.0929)) // Enter Port!
    {
    PlayerPlaySound(playerid, 1153, 0, 0, 0);
    GivePlayerMoney(playerid, -100);
    GameTextForPlayer(playerid, "~w~ You have paid $100 to go to the port!",5000,5);
    MoveObject(PORTOPEN,2405.7924804688, -2266.5617675781, 13.721887588501, 3.00);
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You Are Not In A Vehicle!");
    }
   
    if(IsPlayerInRangeOfPoint(playerid, 20, 2401.5337,-2254.5486,13.1909)) // Exit Port!
    {
    PlayerPlaySound(playerid, 1153, 0, 0, 0);
    GivePlayerMoney(playerid, -100);
    GameTextForPlayer(playerid, "~w~ You have paid $100 to pass into los santos!",5000,5);
    MoveObject(PORTOPEN1,2399.0498046875, -2259.9155273438, 13.582779884338, 3.00);
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"You Are Not In A Vehicle!");
    }
    SetTimer("close", 6000, 0);// Gate Is Open For 6 Seconds
    SetTimer("close", 6000, 0);// Gate Is Open For 6 Seconds
    return 1;
}
Reply


Messages In This Thread
IsPlayerInRangeOfPoint - Problem - by Tessar - 28.12.2010, 07:25
Re: IsPlayerInRangeOfPoint - Problem - by willsuckformoney - 28.12.2010, 07:44
Re: IsPlayerInRangeOfPoint - Problem - by Tessar - 28.12.2010, 07:59
Re: IsPlayerInRangeOfPoint - Problem - by willsuckformoney - 28.12.2010, 08:06
Re: IsPlayerInRangeOfPoint - Problem - by Tessar - 28.12.2010, 08:14
Re: IsPlayerInRangeOfPoint - Problem - by willsuckformoney - 28.12.2010, 09:56
Re: IsPlayerInRangeOfPoint - Problem - by Tessar - 28.12.2010, 10:00
Re: IsPlayerInRangeOfPoint - Problem - by willsuckformoney - 28.12.2010, 10:11
Re: IsPlayerInRangeOfPoint - Problem - by Tessar - 28.12.2010, 10:17
Re: IsPlayerInRangeOfPoint - Problem - by jonnyboy - 28.12.2010, 11:27

Forum Jump:


Users browsing this thread: 1 Guest(s)