[ajuda] CANCELAS para pedagios que n pegar
#1

galera eu coloco o sistema de fs CANCELAS nos pedagios masi n pegar pq pode me ajuda
Reply
#2

Se vocк mandasse o Pastebin ou seu FS aqui , seria uma boa , porque ninguem tem bola de cristal ainda...
Reply
#3

// Pedбgio por Marcelo//
// O FilterScript coloca pedбgios em alguns pontos de SF,LS
// LV Ainda nгo foi feito!

pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <cpstream>
#define COLOR_MSG 0x33AA33AA
// Custos
new TxBike = 5; // Isso Significa q o jogador irб pagar 5 dolares quando passar utilizando uma bike
new TxMotoBike = 15;// Isso Significa q o jogador irб pagar  15 dolares quando passar utilizando uma moto
new TxCar = 20; // Isso Significa q o jogador irб pagar 20 dolares quando passar utilizando um carro
new TxTruck = 85;// Isso Significa q o jogador irб pagar  85 dolares quando passar utilizando um caminhгo, onibus
// Porcentagem Adicional - Impostos - Aqi Voce Irб Definir o Impostos em CIma do Valor (Porcentagem) assim o jogador irб
// pagar o valor + a porcentagem
new TxPorcent = 15; // 15% do Valor

// Array dos CheckPoints dos Pedagios
new Pedagios[10] = { };
// Array das Catacras dos Pedagios
new Catacras[10] = { };

forward PagaPedagio(playerid);
forward SwTurnslide(turnslideid, mode);
forward ValidIsATruck(vehicleid);
forward ValidIsABike(vehicleid);
forward ValidIsAMotorBike(vehicleid);
forward ValidIsACar(vehicleid);
forward SetTextDraw(playerid , money, imposto);
forward GetCarType(vehicleid);
forward Congelar(playerid);
forward Descongelar(playerid);

public OnFilterScriptInit()

{
    print("\n--------------------------------------");
    print("Pedбgio SF/LS. Script Vr1.0");
    print("--------------------------------------\n");
    // Objetos Utilizados nos Pedбgios
    // Catacras de San Fierro - pedбgio 1
    CreateObject(966, -2664.99, 1285.64, 54.45,   0.00, 0.00, 0.00);
    Catacras[0] = CreateObject(968, -2664.9099, 1285.6200, 55.00,   0.00, -90.00, 0.00);
    //-----------------------------------------------------------------
    CreateObject(966, -2673.42, 1285.51, 54.45,   0.00, 0.00, 0.00);
    Catacras[1] = CreateObject(968, -2673.3899, 1285.5200, 55.00,   0.00, -90.00, 0.00);
    //-----------------------------------------------------------------
    CreateObject(966, -2683.09, 1263.13, 54.45,   0.00, 0.00, 0.00);
    Catacras[2] = CreateObject(968, -2683.1001, 1263.1300, 55.00,   0.00, -90.00, 0.00);
    //-----------------------------------------------------------------
    CreateObject(966, -2690.60, 1263.02, 54.45,   0.00, 0.00, 0.00);
    Catacras[3] = CreateObject(968, -2690.5701, 1263.0200, 55.00,   0.00, -90.00, 0.00);
    //-----------------------------------------------------------------
    // CheckPoints Pedagios San Fiero
    Pedagios[0] = CPS_AddCheckpoint(-2668.3137,1273.9611,54.9954, 5.5,5);
    Pedagios[1] = CPS_AddCheckpoint(-2676.0156,1275.2318,54.9974, 5.5,5);
    Pedagios[2] = CPS_AddCheckpoint(-2686.7061,1277.8212,54.9967, 5.5,5);
    Pedagios[3] = CPS_AddCheckpoint(-2694.2705,1274.0186,54.9945, 5.5,5);
    // Los Santos Pedagio 1
    Pedagios[4] = CPS_AddCheckpoint(2806.9316,-421.0658,21.5625, 5.5,5);
    Pedagios[5] = CPS_AddCheckpoint(2799.4644,-426.7913,21.5884, 5.5,5);
    // Los Santos Pedagio 2
    Pedagios[6] = CPS_AddCheckpoint(2791.8972,-438.3035,21.4490, 5.5,5);
    Pedagios[7] = CPS_AddCheckpoint(2783.7698,-441.9258,21.6127, 5.5,5);
    // Los Santos Pedagio 3
    Pedagios[8] = CPS_AddCheckpoint(2851.6899,-702.9770,10.4049, 5.5,5);
    Pedagios[9] = CPS_AddCheckpoint(2841.6714,-702.8436,10.3874, 5.5,5);
    //-----------------------------------------------------------------
    CreateObject(9623, 2804.64, -425.18, 23.40,   2.00, 0.00, 43.00);
    //Pedagio Los Santos
    CreateObject(966, 2795.94, -418.30, 21.10,   0.00, 0.00, 44.00);
    Catacras[4] = CreateObject(968, 2802.67, -411.77, 21.80,   0.00, -90.00, 44.00);
    //-----------------------------------------------------------------
    CreateObject(966, 2802.70, -411.77, 21.10,   0.00, 0.00, 44.00);
    Catacras[5] = CreateObject(968, 2795.96, -418.25, 21.80,   0.00, -90.00, 44.00);
    //-----------------------------------------------------------------
    // Pedagio 2 Los Santos
    CreateObject(9623, 2788.99, -439.84, 23.40,   2.00, 0.00, 43.00);
    //-----------------------------------------------------------------
    CreateObject(966, 2801.49, -441.98, 20.10,   0.00, 0.00, 44.00);
    Catacras[6] = CreateObject(968, 2801.52, -441.91, 20.80,   0.00, -90.00, 44.00);
    //-----------------------------------------------------------------
    CreateObject(966, 2794.54, -448.48, 20.10,   0.00, 0.00, 44.00);
    Catacras[7] = CreateObject(968, 2794.66, -448.39, 20.80,   0.00, -90.00, 44.00);
    // Pedagio 3 Los Santos
    CreateObject(9623, 2846.98, -703.94, 12.50,   0.00, 0.00, 0.00);
    //-----------------------------------------------------------------
    CreateObject(966, 2854.03, -713.92, 9.79,   0.00, 0.00, 0.00);
    Catacras[8] = CreateObject(968, 2854.29, -713.91, 10.50,   0.00, -90.00, 0.00);
    //-----------------------------------------------------------------
    CreateObject(966, 2845.63, -714.17, 9.79,   0.00, 0.00, 0.00);
    Catacras[9] = CreateObject(968, 2845.77, -714.21, 10.50,   0.00, -90.00, 0.00);
    //-----------------------------------------------------------------
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    new resultPda;
    if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[0]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(1,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",1,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[1]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(2,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",2,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[2]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(3,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",3,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[3]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(4,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",4,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[4]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(5,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",5,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[5]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(6,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",6,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[6]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(7,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",7,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[7]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(8,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",8,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[8]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(9,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",9,0);
        }
        return 1;
    }
    else if (CPS_IsPlayerInCheckpoint(playerid, Pedagios[9]))
    {
        resultPda = PagaPedagio(playerid);
        if (resultPda == 1)
        {
            SwTurnslide(10,1);
            SetTimerEx("SwTurnslide",5000, false,"ii",10,0);
        }
        return 1;
    }
    return 1;
}

public PagaPedagio(playerid)
{
    if ( IsPlayerInAnyVehicle(playerid) == 1 )
    {
        TogglePlayerControllable(playerid,0);
        SetTimerEx("Descongelar",1000,false,"i",playerid);
   
        new CarModel;
        new CarID;
        new Taxa;
        new TaxaPc;
        new TotalAPagar;
        CarID = GetPlayerVehicleID(playerid);
        CarModel = GetVehicleModel(CarID);
        Congelar(playerid);
        new CarType;
        CarType = GetCarType(CarModel);
   
        if ( CarType == 4 )
        {
            TaxaPc =  TxPorcent / 100;
            TaxaPc = TaxaPc * TxTruck;
            TotalAPagar = TxTruck + TaxaPc;
            GivePlayerMoney(playerid, -TotalAPagar);
            Taxa = TotalAPagar;
        }
        else if ( CarType == 3 )
        {
            TaxaPc =  TxPorcent / 100;
            TaxaPc = TaxaPc * TxMotoBike;
            TotalAPagar = TxMotoBike + TaxaPc;
            GivePlayerMoney(playerid, -TotalAPagar);
            Taxa = TotalAPagar;
        }
        else if ( CarType == 2 )
        {
            TaxaPc =  TxPorcent / 100;
            TaxaPc = TaxaPc * TxBike;
            TotalAPagar = TxBike + TaxaPc;
            GivePlayerMoney(playerid, -TotalAPagar);
            Taxa = TotalAPagar;
        }
        else if ( CarType == 1 )
        {
            TaxaPc =  TxPorcent / 100;
            TaxaPc = TaxaPc * TxCar;
            TotalAPagar = TxCar + TaxaPc;
            GivePlayerMoney(playerid, -TotalAPagar);
            Taxa = TotalAPagar;
        }
        SetTextDraw(playerid, Taxa, TaxaPc);
        return 1;
    }
    return 0;
}

public SwTurnslide(turnslideid, mode)
{
    switch(turnslideid)
    {
        case 1:
        {
            if (mode == 1) {    SetObjectRot(Catacras[0],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[0],0,-90.00,0);}
        }
        case 2:
        {
            if (mode == 1) {    SetObjectRot(Catacras[1],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[1],0,-90.00,0);}
        }
        case 3:
        {
            if (mode == 1) {    SetObjectRot(Catacras[2],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[2],0,-90.00,0);}
        }
        case 4:
        {
            if (mode == 1) {    SetObjectRot(Catacras[3],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[3],0,-90.00,0);}
        }
        case 5:
        {
            if (mode == 1) {    SetObjectRot(Catacras[4],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[4], 0.00, -90.00, 44.00);}
        }
        case 6:
        {
            if (mode == 1) {    SetObjectRot(Catacras[5],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[5], 0.00, -90.00, 44.00);}
        }
        case 7:
        {
            if (mode == 1) {    SetObjectRot(Catacras[6],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[6], 0.00, -90.00, 44.00);}
        }
        case 8:
        {
            if (mode == 1) {    SetObjectRot(Catacras[7],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[7], 0.00, -90.00, 44.00);}
        }
        case 9:
        {
            if (mode == 1) {    SetObjectRot(Catacras[8],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[8], 0.00, -90.00, 0);}
        }
        case 10:
        {
            if (mode == 1) {    SetObjectRot(Catacras[9],0,0,0);}
            else if (mode == 0){SetObjectRot(Catacras[9], 0.00, -90.00, 0);}
        }
    }
}

public ValidIsATruck(vehicleid)
{
    if (vehicleid == 403 || vehicleid == 406 || vehicleid == 408 || vehicleid == 414 || vehicleid == 423)
    {
        return true;
    }
    else if(vehicleid == 423 || vehicleid == 431 || vehicleid == 433 || vehicleid == 437 || vehicleid == 443)
    {
        return true;
    }
    else if( vehicleid == 455 || vehicleid == 456 || vehicleid == 478 || vehicleid == 498 || vehicleid == 499)
    {
        return true;
    }
    else if (vehicleid == 508 || vehicleid == 514 || vehicleid == 515 || vehicleid == 524 || vehicleid == 525)
    {
        return true;
    }
    else if(vehicleid == 552 || vehicleid == 573 || vehicleid == 578 || vehicleid == 588 || vehicleid == 609)
    {
        return true;
    }
    else { return false; }
}

public ValidIsAMotorBike(vehicleid)
{
    if (vehicleid == 448 || vehicleid == 461 || vehicleid == 462 || vehicleid == 463 || vehicleid == 468)
    {
        return true;
    }
    else if(vehicleid == 471 || vehicleid == 521 || vehicleid == 522 || vehicleid == 523 || vehicleid == 581)
    {
        return true;
    }
    else if( vehicleid == 586)
    {
        return true;
    }
    else { return false; }
}

public ValidIsABike(vehicleid)
{
    if (vehicleid == 481 || vehicleid == 509 || vehicleid == 510)
    {
        return true;
    }
    else { return false; }
}

public ValidIsACar(vehicleid)
{
  if ( ValidIsATruck(vehicleid) )
  {
    return false;
  }
  else if ( ValidIsAMotorBike(vehicleid) )
  {
    return false;
  }
  else if ( ValidIsABike(vehicleid) )
  {
    return false;
  }
  else { return true; }
}

public GetCarType(vehicleid)
{
  if ( ValidIsATruck(vehicleid) )
  {
    return 4;
  }
  else if ( ValidIsAMotorBike(vehicleid) )
  {
    return 3;
  }
  else if ( ValidIsABike(vehicleid) )
  {
    return 2;
  }
  else if ( ValidIsACar(vehicleid) )
  {
    return 1;
  }
  else { return 0; }
}

public SetTextDraw(playerid , money, imposto)
{
    new moneystr[256];
    format(moneystr, sizeof(moneystr),"Pago %i $ + %i De Imposto", money, imposto);
    SendClientMessage(playerid, COLOR_MSG, moneystr);
    new str[256];
    new pName[256];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, sizeof(str),"Obrigado Sr.%s Tenha um Bom Dia!", pName);
    SendClientMessage(playerid, COLOR_MSG, str);
}

public Congelar(playerid)
{
    TogglePlayerControllable(playerid,0);
}

public Descongelar(playerid)
{
    TogglePlayerControllable(playerid,1);
}
Reply
#4

Nгo Pega Como assim ?
oque Acontece ?

@EDIT

Uza Streamer no seu Gm ?
Exemplo. CreateDynamic...
Reply
#5

Espera atй amanhг quando os caras voltarem da escola quem estuda de manhг e vocк vai ser respondido!
Reply
#6

tipo quando vou ve no jogo as canselas n ta no pedagios
Reply
#7

Olha meu Post de Cima .
Reply
#8

sim mano
Reply
#9

Intao Coloque no Fs Tbm CreateDynamicObject

Porque si nao nao adianta nada usar streamer fazendo assim

Abra o Fs ctrl + H (Si nao me engano).
Digite CreateObject em Search For
E em Replace With digite : CreateDynamicObject
Reply
#10

ok vou testa aki
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)