This is untested, but it should work (if I didnt put a typo in it):
else if ( szCmd == "spawncar" )
{
if (szParams )
{
if ( IsNum( SzParams ) )
{
if ( szParams.tointeger() <= 150 && szParams.tointeger() >= 90 )
{
MessagePlayer( "Spawning a vehicle with model ID " + szParams, pPlayer);
local pVehicle = CreateVehicle( szParams.tointeger(), pPlayer.Pos, pPlayer.Angle );
}
}
else
{
if ( GetVehicleIDFromName( params ) != 0 )
{
MessagePlayer( "Spawning vehicle with model ID " + GetVehicleIDFromName( szParams ), pPlayer);
local pVehicle = CreateVehicle( GetVehicleIDFromName( szParams ), pPlayer.Pos, pPlayer.Angle );
}
else
{
MessagePlayer( "Invalid Model Name", pPlayer);
}
}
}
}