[Ajuda] Comando
#1

criei um comando para desligar os motores por que n concegui que eles nasce-cem desligados :S
deu 2 erros sera que podem me ajudar?

Comando

Quote:

if (strcmp("/carrosreset", cmdtext, true, 10) == 0)
{
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
if(IsPlayerInAnyVehicle(playerid))
for(new player=0; player<MAX_PLAYERS; player++)
{
linha do erro - else if(EngineCarro[vid] == 1 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new viados[MAX_PLAYER_NAME];
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFFFFFFAA, "Motor {E31919}Desligado!");
EngineCarro[vid] = 0;
GetPlayerName(playerid, viados, sizeof(viados));
format(string, sizeof(string), "* %s Girou a chave e desligou o veiculo.", viados);
ProxDetector(20.0, playerid, string, ROXO,ROXO,ROXO,ROXO,ROXO);
}
}
return 1;
}

erros

Quote:

C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 43) : error 029: invalid expression, assumed zero
C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 43) : warning 215: expression has no effect
C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 43) : error 001: expected token: ";", but found "if"

Reply
#2

alguйm?
Reply
#3

pawn Код:
if (strcmp("/carrosreset", cmdtext, true) == 0)
{
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new viados[MAX_PLAYER_NAME];
    if(IsPlayerInAnyVehicle(playerid) && EngineCarro[vid] == 1 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, 0xFFFFFFAA, "Motor {E31919}Desligado!");
            EngineCarro[vid] = 0;
            GetPlayerName(playerid, viados, sizeof(viados));
            format(string, sizeof(string), "* %s Girou a chave e desligou o veiculo.", viados);
            ProxDetector(20.0, playerid, string, ROXO,ROXO,ROXO,ROXO,ROXO);
        }
    }
    return 1;
}
Reply
#4

Tenta aн
PHP код:
if (strcmp("/carrosreset"cmdtexttrue10) == 0)
{
    new 
vid GetPlayerVehicleID(playerid);
    new 
enginelightsalarmdoorsbonnetbootobjective;

    if(
IsPlayerInAnyVehicle(playerid))
    {
        for(new 
player=0player<MAX_PLAYERSplayer++)
        {
            if(
EngineCarro[vid] == && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
            new 
viados[MAX_PLAYER_NAME];

            
GetVehicleParamsEx(vid,engine,lights,alarm,doors,b onnet,boot,objective);
            
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,a larm,doors,bonnet,boot,objective);
            
EngineCarro[vid] = 0;

            
SendClientMessage(playerid0xFFFFFFAA"Motor {E31919}Desligado!");
            
GetPlayerName(playeridviadossizeof(viados));
            
format(stringsizeof(string), "* %s Girou a chave e desligou o veiculo."viados);
            
ProxDetector(20.0playeridstringROXO,ROXO,ROXO,ROXO,ROXO);
            }
        }
    }
    return 
1;

Reply
#5

4 erros '-'

Quote:

C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 45) : error 017: undefined symbol "b"
C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 45) : error 017: undefined symbol "onnet"
C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 45) : error 029: invalid expression, assumed zero
C:\Users\Yuri\Desktop\GM\BID\gamemodes\BID.pwn(249 45) : fatal error 107: too many error messages on one line

Reply
#6

ja arrumei vlw ai '-'
Reply
#7

new engine, lights, alarm, doors, bonnet, boot, objective; Certa

new engine, lights, alarm, doors, b onnet, boot, objective; Errada
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)