[Ajuda] /motor e /farol
#1

Toda veis que eu tento colocar esse sistema na minha gm da erro tem como alguem ver o que esta faltando no codigo para min?

Код:
if (strcmp("/motor", cmdtext, true, 10) == 0)
    {
        new State;
        new mot, lu, alar, por, cap, porma, ob;
        new carro = GetPlayerVehicleID(playerid);
                if(carro != INVALID_VEHICLE_ID)
        {
                        State=GetPlayerState(playerid);
                        if(State!=PLAYER_STATE_DRIVER)
                        {
                                SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й o motorista do carro !");
                            return 1;
                        }
                   if(motor[playerid] == 0)
                   {
                        GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                        SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
                        motor[playerid] = 1;
                        SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
                                format(string, sizeof(string), "O motorista leva sua mгo direita atй a igniзгo do veiculo e liga o veнculo.");
                                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                   }
                   else if(motor[playerid] == 1)
                   {
                        GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                        SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
                        motor[playerid] = 0;
                        SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
                                format(string, sizeof(string), "O motorista leva sua mгo direita atй a igniзгo do veiculo e desliga o veнculo.");
                                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else
        {
                                SendClientMessage(playerid, COLOR_GREY, "Vocк precisa estar em um carro para usar este comando !");
        }
         }
        return 1;
}
if (strcmp("/farol", cmdtext, true, 10) == 0)
    {
        new State;
        new mot, lu, alar, por, cap, porma, ob;
        new carro = GetPlayerVehicleID(playerid);
                if(carro != INVALID_VEHICLE_ID)
        {
                        State=GetPlayerState(playerid);
                        if(State!=PLAYER_STATE_DRIVER)
                        {
                                SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й o motorista do carro !");
                            return 1;
                        }
                if(luz[playerid] == 0)
                {
                    GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                    SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_ON, alar, por, cap, porma, ob);
                    luz[playerid] = 1;
                    SendClientMessage(playerid, 0xFFFFFFAA, "Farol {2F991A}Ligado!");
                }
                else if(luz[playerid] == 1)
                {
                    GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
                    SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob);
                    luz[playerid] = 0;
                    SendClientMessage(playerid, 0xFFFFFFAA, "Farol {E31919}Desligado!");
                }
                else
        {
                                SendClientMessage(playerid, COLOR_GREY, "Vocк precisa estar em um carro para usar este comando !");
        }
         }
        return 1;
}
Erros

Код:
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(23) : warning 201: redefinition of constant/macro (symbol "STREAMER_AREA_TYPE_RECTANGLE")
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(26) : warning 201: redefinition of constant/macro (symbol "STREAMER_AREA_TYPE_POLYGON")
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(50017) : warning 219: local variable "weapons" shadows a variable at a preceding level
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(50057) : error 017: undefined symbol "motor"
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(50057) : warning 215: expression has no effect
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(50057) : error 001: expected token: ";", but found "]"
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(50057) : error 029: invalid expression, assumed zero
C:\Users\Matheus\Desktop\Brasil Cidade Virtual 0.3z\gamemodes\BCV.pwn(50057) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread
/motor e /farol - by druiida159 - 07.12.2014, 12:21
Re: /motor e /farol - by [BOPE]Seu._.Madruga - 07.12.2014, 13:03
Re: /motor e /farol - by druiida159 - 07.12.2014, 20:09

Forum Jump:


Users browsing this thread: 1 Guest(s)