[Ajuda] /ligarveiculo e /deslgiarv com problema!!!
#1

Quem puder me ajudar da um help por favorrrr

O meu /ligarv e /desligarv nгo estб funcinando em alguns carros do GM, ele liga alguns carros....

PHP код:
CMD:ligarv (playerid)
{
    new 
vid GetPlayerVehicleID(playerid);
    for(new 
049 y++)
    {
        if (
vid==VPM[y]||vid==VPC[y]||vid==VHOSPITAL[y]||vid==VSK[y]||vid==VRACERS[y]||vid==VMECANICO[y]||vid==VAZTECAS[y]||vid==VTRIAD[y]||vid==VVAGOS[y]||vid==VHOTEL1[y]||vid==VAERO[y]||vid==VALQAEDA[y]||vid==VBOMBEIROS[y]||vid==VCAMINHONEIRO[y]||vid==VEXERCITO[y]||vid==VGROOVE[y]||vid==VREPORTER[y]||vid==VSEGURANCA[y]||vid==VTAXI[y]||vid==VHITMANS[y])
        {
             
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            
y++;
        }
    }
    return 
1;
}
CMD:desligarv (playerid)
{
    new 
vid GetPlayerVehicleID(playerid);
    for(new 
050y++)
    {
        if (
IsPlayerInAnyVehicle(playerid))
          {
              if (
vid==VPM[y]||vid==VPC[y]||vid==VHOSPITAL[y]||vid==VSK[y]||vid==VRACERS[y]||vid==VMECANICO[y]||vid==VAZTECAS[y]||vid==VTRIAD[y]||vid==VVAGOS[y]||vid==VHOTEL1[y]||vid==VAERO[y]||vid==VALQAEDA[y]||vid==VBOMBEIROS[y]||vid==VCAMINHONEIRO[y]||vid==VEXERCITO[y]||vid==VGROOVE[y]||vid==VREPORTER[y]||vid==VSEGURANCA[y]||vid==VTAXI[y]||vid==VHITMANS[y])
            {
                 
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
               }
        }
    }
    return 
1;
}
CMD:alugarv (playeridcmdtext[])
{
    new 
vid GetPlayerVehicleID(playerid);
    for(new 
030y++)
    {
        if (
vid == VALUGUEL[y])
        {
            
GetPlayerMoney(playerid);
            if (
GetPlayerMoney(playerid) < 500)
            {
                  
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                
SendClientMessage(playeridCOR_ERRO"Voce precisa de R$500,00 para alugar");
                
RemovePlayerFromVehicle(playerid);
              }
            else
            {
                
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                  
GivePlayerMoney(playerid, -500);
                  
SendClientMessage(playeridCOR_SUCESSO"Carro alugado");
            }
        }
    }
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)