01.09.2013, 13:14
Have you read GetVehicleModelIDFromName function?
It adds + 400 so it will be between 400-611.
So change to:
and
pawn Код:
stock GetVehicleModelIDFromName(vehname[])
{
for(new i = 0; i < 211; i++)
{
if (strfind(VehicleNames[i], vehname, true) != -1) return i + 400;
}
return -1;
}
So change to:
pawn Код:
if(vehid < 400 || vehid > 611) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: Invalid Vehicle Name.");
pawn Код:
format(message, sizeof(message), "[Info] %s has spawned a %s (ID: %d).", name, VehicleNames[vehid - 400], vehid);