[Ajuda] Mensagem floodando ajuda
#1

Bom pessoal a mensagem " SendClientMessage(playerid, 0xE0FF6BFF, "O Motor deste veнculo estб desligado, USE: /motor para liga-lo!"); " estб floodando jб coloquei um return1;, quando eu coloco o return o veнculo civil nгo liga automaticamente, ai quando eu tiro eles volta a ligar automatico .

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vid = GetPlayerVehicleID(playerid);
        for(new VC = 0; VC <= 13; VC++)
        {
            if(Motor_Do_Veiculo[vid] == false && IsPlayerInVehicle(playerid,CivilVeiculo[VC]))
            {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                Motor_Do_Veiculo[vid] = true;
                SendClientMessage(playerid, 0xF8B377FF, "[VEICULO INICIAL] - O seu veнculo foi ligado automaticamente.");
            }
            else
            {
                SendClientMessage(playerid, 0xE0FF6BFF, "O Motor deste veнculo estб desligado, USE: /motor para liga-lo!");
            }
        }
Reply
#2

Poste o seu cуdigo aqui para podermos solucionar este problema .



This forum requires that you wait 120 seconds between posts. Please try again in 23 seconds.
Reply
#3

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Poste o seu cуdigo aqui para podermos solucionar este problema .



This forum requires that you wait 120 seconds between posts. Please try again in 23 seconds.
Postei.
Reply
#4

PHP код:
        for(new VC 0VC <= 13VC++)
        {
            if(
Motor_Do_Veiculo[vid] == false && IsPlayerInVehicle(playerid,CivilVeiculo[VC]))
            {
                
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                
Motor_Do_Veiculo[vid] = true;
                
SendClientMessage(playerid0xF8B377FF"[VEICULO INICIAL] - O seu veнculo foi ligado automaticamente.");
                return 
1;
            }
        }
        if(
Motor_Do_Veiculo[vid] == false)
        {
             
SendClientMessage(playerid0xE0FF6BFF"O Motor deste veнculo estб desligado, USE: /motor para liga-lo!");
        } 
Tenta ai ...
Reply
#5

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
PHP код:
        for(new VC 0VC <= 13VC++)
        {
            if(
Motor_Do_Veiculo[vid] == false && IsPlayerInVehicle(playerid,CivilVeiculo[VC]))
            {
                
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                
Motor_Do_Veiculo[vid] = true;
                
SendClientMessage(playerid0xF8B377FF"[VEICULO INICIAL] - O seu veнculo foi ligado automaticamente.");
                return 
1;
            }
        }
        if(
Motor_Do_Veiculo[vid] == false)
        {
             
SendClientMessage(playerid0xE0FF6BFF"O Motor deste veнculo estб desligado, USE: /motor para liga-lo!");
        } 
Tenta ai ...
Parou de floodar, mais a MSG " SendClientMessage(playerid, 0xE0FF6BFF, "O Motor deste veнculo estб desligado, USE: /motor para liga-lo!"); " Nгo aparece para os veнculos normais.
Reply
#6

Poste seu toda a parte do sistema de motor , de todos os tipos de veiculos .
Reply
#7

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Poste seu toda a parte do sistema de motor , de todos os tipos de veiculos .
pawn Код:
CMD:motor(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new vid = GetPlayerVehicleID(playerid);
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFAB288FF, "Vocк precisa estar dentro de um veнculo para ligar o motor.");
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        {
            SendClientMessage(playerid,0xFAB288FF,"Vocк nгo й o Piloto/Motorista do veнculo.");
            return true;
        }
        if(Motor_Do_Veiculo[vid] == false && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            Motor_Do_Veiculo[vid] = true;
            SendClientMessage(playerid, 0x8CFA88FF, "[MOTOR LIGADO] {FBFF79}Vocк ligou o motor do seu veнculo.");
            format(String, sizeof(String), "%s ligou o motor do veнculo.", PlayerNick(playerid));
            ProxDetector(10.0, playerid, String, ROXO_BEM_CLARO,ROXO_BEM_CLARO,ROXO_BEM_CLARO,ROXO_BEM_CLARO,ROXO_BEM_CLARO);
        }
        else if(Motor_Do_Veiculo[vid] == true && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
            Motor_Do_Veiculo[vid] = false;
            SendClientMessage(playerid, 0xDA4B4BFF, "[MOTOR DESLIGADO] {FBFF79}Vocк desligou o motor do seu veнculo.");
            format(String, sizeof(String), "%s Desligou o motor do veнculo.", PlayerNick(playerid));
            ProxDetector(10.0, playerid, String, ROXO_BEM_CLARO,ROXO_BEM_CLARO,ROXO_BEM_CLARO,ROXO_BEM_CLARO,ROXO_BEM_CLARO);
        }
    }
    return true;
}

/// veiculos

new
GrooveVeiculo[10],
BallasVeiculo[10],
AztecasVeiculo[10],
VagosVeiculo[10],
CivilVeiculo[13]
;

//-------------[ Os AddStaticVehicleEx ]-------------//
    CivilVeiculo[0] = AddStaticVehicleEx(462, 2012.6415, -1274.3828, 23.4188, 182.6345, 0, 0, 300);
    CivilVeiculo[1] = AddStaticVehicleEx(462, 1978.9014, -1274.5719, 23.3899, 180.4180, 1, 1, 300);
    CivilVeiculo[2] = AddStaticVehicleEx(462, 1981.6979, -1274.5699, 23.3896, 178.4302, 2, 2, 300);
    CivilVeiculo[3] = AddStaticVehicleEx(462, 1984.7279, -1274.5609, 23.3897, 178.2944, 3, 3, 300);
    CivilVeiculo[4] = AddStaticVehicleEx(462, 1987.6003, -1274.5469, 23.3906, 179.5856, 4, 4, 300);
    CivilVeiculo[5] = AddStaticVehicleEx(462, 1990.6230, -1274.5784, 23.3894, 181.2389, 5, 5, 300);
    CivilVeiculo[6] = AddStaticVehicleEx(462, 1993.5961, -1274.5565, 23.3892, 179.0403, 6, 6, 300);
    CivilVeiculo[7] = AddStaticVehicleEx(462, 1996.6348, -1274.6083, 23.3886, 179.0550, 7, 7, 300);
    CivilVeiculo[8] = AddStaticVehicleEx(462, 1999.3888, -1274.5767, 23.3888, 181.4814, 24, 24, 300);
    CivilVeiculo[9] = AddStaticVehicleEx(462, 2002.5083, -1274.5861, 23.3894, 179.3820, 86, 86, 300);
    CivilVeiculo[10] = AddStaticVehicleEx(462, 2005.3447, -1274.6067, 23.3936, 181.0860, 128, 128, 300);
    CivilVeiculo[11] = AddStaticVehicleEx(462, 2008.3119, -1274.5967, 23.3886, 182.4561, 183, 183, 300);
    CivilVeiculo[12] = AddStaticVehicleEx(462, 1975.1104, -1274.3145, 23.4201, 176.9130, 93, 93, 300);

    GrooveVeiculo[0] = AddStaticVehicleEx(581, 2492.7188, -1657.5443, 13.0587, 178.1759, 16,16, 10800);
    GrooveVeiculo[1] = AddStaticVehicleEx(461, 2498.3198, -1657.9066, 13.0723, 171.8152, 16,16, 10800);
    GrooveVeiculo[2] = AddStaticVehicleEx(521, 2502.4534, -1661.6437, 13.0868, 151.4673, 16,16, 10800);
    GrooveVeiculo[3] = AddStaticVehicleEx(500, 2506.0549, -1666.8566, 13.0878, 123.8087, 16,16, 10800);
    GrooveVeiculo[4] = AddStaticVehicleEx(496, 2505.4839, -1672.6007, 13.0740, 88.1633, 16,16, 10800);
    GrooveVeiculo[5] = AddStaticVehicleEx(533, 2502.2749, -1677.8938, 13.0745, 54.9405, 16,16, 10800);
    GrooveVeiculo[6] = AddStaticVehicleEx(589, 2496.5474, -1680.3580, 13.0526, 19.5022, 16,16, 10800);
    GrooveVeiculo[7] = AddStaticVehicleEx(585, 2491.0649, -1680.7745, 13.0418, 1.5245, 16,16, 10800);
    GrooveVeiculo[8] = AddStaticVehicleEx(560, 2483.9172, -1680.4801, 13.0388, 354.4576, 16,16, 10800);

    BallasVeiculo[0] = AddStaticVehicleEx(585, 659.8429, -1645.1439, 14.3081, 177.6864, 85,85, 10800);
    BallasVeiculo[1] = AddStaticVehicleEx(560, 670.5228, -1643.3558, 14.4079, 86.8164, 85,85, 10800);
    BallasVeiculo[2] = AddStaticVehicleEx(533, 670.2716, -1647.3403, 14.2027, 91.2701, 85,85, 10800);
    BallasVeiculo[3] = AddStaticVehicleEx(500, 670.6389, -1651.2462, 14.2769, 90.0710, 85,85, 10800);
    BallasVeiculo[4] = AddStaticVehicleEx(589, 670.4974, -1655.1764, 13.6089, 89.6897, 85,85, 10800);
    BallasVeiculo[5] = AddStaticVehicleEx(496, 670.7864, -1659.5935, 13.3499, 89.2885, 85,85, 10800);
    BallasVeiculo[6] = AddStaticVehicleEx(461, 651.0493, -1649.0388, 14.4169, 269.0190, 85,85, 10800);
    BallasVeiculo[7] = AddStaticVehicleEx(521, 651.0615, -1646.1985, 14.4351, 268.1945, 85,85, 10800);
    BallasVeiculo[8] = AddStaticVehicleEx(581, 650.9241, -1643.7020, 14.4954, 273.3327, 85,85, 10800);

    AztecasVeiculo[0] = AddStaticVehicleEx(500,1225.4344, -1009.5981, 32.7086, 278.0129, 2,2, 10800);
    AztecasVeiculo[1] = AddStaticVehicleEx(585,1240.8612, -1004.2327, 32.1887, 98.6510, 2,2, 10800);
    AztecasVeiculo[2] = AddStaticVehicleEx(560,1241.4324, -1008.1479, 32.3085, 96.2001, 2,2, 10800);
    AztecasVeiculo[3] = AddStaticVehicleEx(533,1241.9584, -1011.8358, 32.3190, 96.4101, 2,2, 10800);
    AztecasVeiculo[4] = AddStaticVehicleEx(589,1242.4010, -1015.5906, 32.2612, 93.4706, 2,2, 10800);
    AztecasVeiculo[5] = AddStaticVehicleEx(496,1242.5725, -1019.6906, 32.3019, 96.3139, 2,2, 10800);
    AztecasVeiculo[6] = AddStaticVehicleEx(521,1225.8643, -1018.3614, 32.1689, 276.1620, 2,2, 10800);
    AztecasVeiculo[7] = AddStaticVehicleEx(581,1225.9906, -1020.2427, 32.1961, 268.9657, 2,2, 10800);
    AztecasVeiculo[8] = AddStaticVehicleEx(461,1226.2628, -1022.1782, 32.1827, 272.0151, 2,2, 10800);

    VagosVeiculo[0] = AddStaticVehicleEx(500, 2575.0400, -1027.1521, 69.6920, 176.3905, 6,6, 10800);
    VagosVeiculo[1] = AddStaticVehicleEx(589, 2578.8445, -1027.5051, 69.2319, 175.9995, 6,6, 10800);
    VagosVeiculo[2] = AddStaticVehicleEx(560, 2582.5295, -1027.9084, 69.2761, 174.8300, 6,6, 10800);
    VagosVeiculo[3] = AddStaticVehicleEx(585, 2586.3906, -1028.4574, 69.1590, 174.1256, 6,6, 10800);
    VagosVeiculo[4] = AddStaticVehicleEx(581, 2570.8296, -1038.4465, 69.1706, 268.0432, 6,6, 10800);
    VagosVeiculo[5] = AddStaticVehicleEx(521, 2570.7930, -1040.1599, 69.1427, 272.6797, 6,6, 10800);
    VagosVeiculo[6] = AddStaticVehicleEx(461, 2570.8232, -1041.8363, 69.1585, 270.9237, 6,6, 10800);
    VagosVeiculo[7] = AddStaticVehicleEx(533, 2579.0476, -1053.1356, 69.3162, 269.8736, 6,6, 10800);
    VagosVeiculo[8] = AddStaticVehicleEx(496, 2589.1189, -1053.4136, 69.2417, 267.8491, 6,6, 10800);
Reply
#8

Nгo esta parte , a parte do OnPlayerStateChange...
Reply
#9

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Nгo esta parte , a parte do OnPlayerStateChange...
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vid = GetPlayerVehicleID(playerid);
        for(new VC = 0; VC <= 13; VC++)
        {
            if(Motor_Do_Veiculo[vid] == false && IsPlayerInVehicle(playerid,CivilVeiculo[VC]))
            {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                Motor_Do_Veiculo[vid] = true;
                SendClientMessage(playerid, 0xF8B377FF, "[VEICULO INICIAL] - O seu veнculo foi ligado automaticamente.");
                return 1;
            }
        }
        if(Motor_Do_Veiculo[vid] == false)
        {
             SendClientMessage(playerid, 0xE0FF6BFF, "O Motor deste veнculo estб desligado, USE: /motor para liga-lo!");
        }

        for(new VO = 0; VO <= 10; VO++)
        {
            if(IsPlayerInVehicle(playerid, GrooveVeiculo[VO]) && DadosJogador[playerid][ORGANIZACAO_JOGADOR] != GROOVE)
            {
                SendClientMessage(playerid,COR_GROOVE_STREET,"Vocк nгo faz parte da organizaзгo [ Groove Street ]");
                TogglePlayerControllable(playerid,0); SetTimerEx("Descongelar",500,0,"i",playerid); RemovePlayerFromVehicle(playerid);
            }
            if(IsPlayerInVehicle(playerid, BallasVeiculo[VO]) && DadosJogador[playerid][ORGANIZACAO_JOGADOR] != BALLAS)
            {
                SendClientMessage(playerid,COR_BALLAS,"Vocк nгo faz parte da organizaзгo [ Ballas ]");
                TogglePlayerControllable(playerid,0); SetTimerEx("Descongelar",500,0,"i",playerid); RemovePlayerFromVehicle(playerid);
            }
            if(IsPlayerInVehicle(playerid, AztecasVeiculo[VO]) && DadosJogador[playerid][ORGANIZACAO_JOGADOR] != AZTECAS)
            {
                SendClientMessage(playerid,COR_AZTECAS,"Vocк nгo faz parte da organizaзгo [ Aztecas ]");
                TogglePlayerControllable(playerid,0); SetTimerEx("Descongelar",500,0,"i",playerid); RemovePlayerFromVehicle(playerid);
            }
            if(IsPlayerInVehicle(playerid, VagosVeiculo[VO]) && DadosJogador[playerid][ORGANIZACAO_JOGADOR] != VAGOS)
            {
                SendClientMessage(playerid,COR_VAGOS,"Vocк nгo faz parte da organizaзгo [ Vagos ]");
                TogglePlayerControllable(playerid,0); SetTimerEx("Descongelar",500,0,"i",playerid); RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return true;
}
Reply
#10

Este seu cуdigo o sistema de motores й sу para os veiculos de civil pelo oque eu vi .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)