[AJUDA] Da uma ajudinha aqui galera (Cancela)
#10

pawn Код:
public IsPlayerAtToll()
{
    for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
    {
        if(IsPlayerInRangeOfPoint(playerid,10.0,828.90002441406,-2046.8409423828,12.89999961853) && PedagioPago[playerid] == false)
        {
            SetObjectRot(Gate1,0,0,0);
            SendClientMessage(playerid, COR_ROXO, "Vocк Pagou o Pedagio e a Cancela se Abriu.");
            SendClientMessage(playerid, COLOR_RED, "-$500");
            GivePlayerMoney(playerid, -500);
            PedagioPago[playerid] = true;
            SetTimerEx("CloseGate", 5000, false, "ii", Gate1,playerid);
        }
        else if(IsPlayerInRangeOfPoint(playerid,10.0,843.3994140625,-2060.498046875,12.89999961853) && PedagioPago[playerid] == false)
        {
            SetObjectRot(Gate2,0,0,0);
            SendClientMessage(playerid, COR_ROXO, "Vocк Pagou o Pedagio e a Cancela se Abriu.");
            SendClientMessage(playerid, COLOR_RED, "-$500");
            GivePlayerMoney(playerid, -500);
            PedagioPago[playerid] = true;
            SetTimerEx("CloseGate2", 5000, false, "ii", Gate2,playerid);
        }
    }
    return 1;
}

public CloseGate(gateid,playerid)
{
    if(gateid == Gate1)
        SetObjectRot(Gate1,0,270,0);
    if(gateid == Gate2)
        SetObjectRot(Gate2,0,90,0);

    PedagioPago[playerid] = false;
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)