04.07.2018, 14:33
For a start, do not call GetVehicleEngineType function 4 times.
if/else if can be replaced with a switch.
format is useless when can set string directly.
if/else if can be replaced with a switch.
format is useless when can set string directly.
pawn Код:
switch (GetVehicleEngineType(modelid))
{
case 'H': typestr = "Human Powered";
case 'D': typestr = "Diesel";
case 'P': typestr = "Petrol";
case 'E': typestr = "Electric";
}