31.07.2011, 22:39
i got this now
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
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 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