return as invalid command
#11

i got this now
pawn Код:
#define MAX_OV    50

CMD:reload(playerid, params[])
{
    Loop(MAX_VEHICLES, v)
    {
        print("1");
        if(VehicleData[getVehicleID(v)][Vehiclecost] == 100)
        {
            DestroyVehicle(getVehicleID(v));
            printf("Vehicle ID: %d |> Removed!", getVehicleID(v));
            print("2");
        }
    }
    print("3");
    SetTimer("Loadvehicles", 5000, false);
    print("4");
    return 1;
}

forward Loadvehicles();
public Loadvehicles()
{
    LoadOwnedVehicles();
    return 1;
}

stock GetVehicleID(vehicleid)
{
    Loop(MAX_VEHICLES, vID)
    {
        if(VehicleData[vID][VehicleID] == vehicleid)
        {
            return vID;
        }
    }
    return -1;
}
i want to remove all vehicles that cost $100

i got a commadn /cost to check it too

it says id:

1
&
2
costs $100

but it removes vehicle 0 and 1 instead..

[00:35:38] Vehicle ID: 0 |> Removed!
[00:35:38] Vehicle ID: 1 |> Removed!

it removes vehicles but still return unknown
Reply


Messages In This Thread
return as invalid command - by Unknown123 - 31.07.2011, 21:26
Re: return as invalid command - by Jefff - 31.07.2011, 22:02
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:07
Re: return as invalid command - by Jefff - 31.07.2011, 22:09
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:14
Re: return as invalid command - by Jefff - 31.07.2011, 22:16
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:17
Re: return as invalid command - by Jefff - 31.07.2011, 22:19
Re: return as invalid command - by Sasino97 - 31.07.2011, 22:22
Re: return as invalid command - by Jefff - 31.07.2011, 22:29
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:39
Re: return as invalid command - by Jefff - 31.07.2011, 22:45
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:47
Re: return as invalid command - by Jefff - 31.07.2011, 22:50
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:55
Re: return as invalid command - by Jefff - 31.07.2011, 23:01

Forum Jump:


Users browsing this thread: 2 Guest(s)